Commit 93972964 authored by cmarrin@apple.com's avatar cmarrin@apple.com
Browse files

Implement accelerated compositing

https://bugs.webkit.org/show_bug.cgi?id=27314

Initial implementation, but disabled in this checkin.
To enable ENABLE_3D_RENDERING and USE_ACCELERATED_COMPOSITING
must be turned on. Also d3d9.lib and d3d9x.lib must be added
to the build.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b983e904
2009-11-24 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
Add ability to enable ACCELERATED_COMPOSITING on Windows (currently disabled)
https://bugs.webkit.org/show_bug.cgi?id=27314
* wtf/Platform.h:
2009-11-24 Jason Smith <dark.panda@gmail.com>
Reviewed by Alexey Proskuryakov.
......
......@@ -902,6 +902,10 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define WTF_USE_ACCELERATED_COMPOSITING 1
#endif
#if PLATFORM(WIN)
#define WTF_USE_ACCELERATED_COMPOSITING 0
#endif
#if COMPILER(GCC)
#define WARN_UNUSED_RETURN __attribute__ ((warn_unused_result))
#else
......
2009-11-24 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
Skip 3d and compositing tests on all platforms but Mac
https://bugs.webkit.org/show_bug.cgi?id=27314
For Mac, tests are performed in webkitdirs.pm to determine
whether these tests should be skipped.
* platform/gtk/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
2009-11-24 Chris Marrin <cmarrin@apple.com>
 
Reviewed by Eric Seidel.
......@@ -5682,3 +5682,7 @@ http/tests/security/isolatedWorld/didClearWindowObject.html
# Need to add functionality to DumpRenderTree to handle error pages
fast/history/back-forward-reset-after-error-handling.html
# Tests requiring 3D_RENDERING and ACCELERATED_COMPOSITING support
animations/3d
transforms/3d
compositing
......@@ -5229,6 +5229,11 @@ storage/domstorage/localstorage/window-open.html
#crasher:
storage/domstorage/sessionstorage/window-open.html
# Tests requiring 3D_RENDERING and ACCELERATED_COMPOSITING support
animations/3d
transforms/3d
compositing
# ================================================================== #
# validationMessage: https://bugs.webkit.org/show_bug.cgi?id=27959
......
......@@ -704,6 +704,11 @@ fast/history/back-forward-reset-after-error-handling.html
# https://bugs.webkit.org/show_bug.cgi?id=31479
websocket
# Tests requiring 3D_RENDERING and ACCELERATED_COMPOSITING support
animations/3d
transforms/3d
compositing
# validationMessage: https://bugs.webkit.org/show_bug.cgi?id=27959
fast/forms/validationMessage.html
......
2009-11-24 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
Implement accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=27314
This part of the checkin adds the Windows specific GraphicsLayer support files.
It provides the interface between GraphicsLayer and CACF. It also deals with
the compositing loop, and provides the plumbing to pass the root layer up to
WebView.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcproj/WebCoreCommon.vsprops:
* page/FrameView.cpp:
(WebCore::FrameView::syncCompositingStateRecursive):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
* platform/graphics/GraphicsLayer.h:
* platform/graphics/win/GraphicsLayerCACF.cpp: Added.
* platform/graphics/win/GraphicsLayerCACF.h: Added.
* platform/graphics/win/WKCACFContextFlusher.cpp: Added.
* platform/graphics/win/WKCACFContextFlusher.h: Added.
* platform/graphics/win/WKCACFContextFlusherWin.cpp: Added.
* platform/graphics/win/WKCACFLayer.cpp: Added.
* platform/graphics/win/WKCACFLayer.h: Added.
* platform/graphics/win/WKCACFLayerWindow.cpp: Added.
* platform/graphics/win/WKCACFLayerWindow.h: Added.
2009-11-24 Chris Marrin <cmarrin@apple.com>
 
Reviewed by Eric Seidel.
......@@ -38,7 +38,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
PreprocessorDefinitions="QUARTZCORE_DLL"
ForcedIncludeFiles=""
/>
<Tool
......@@ -94,7 +95,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
PreprocessorDefinitions="QUARTZCORE_DLL"
ForcedIncludeFiles=""
/>
<Tool
......@@ -149,7 +151,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
PreprocessorDefinitions="QUARTZCORE_DLL"
ForcedIncludeFiles=""
/>
<Tool
......@@ -204,7 +207,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
PreprocessorDefinitions="QUARTZCORE_DLL"
ForcedIncludeFiles=""
/>
<Tool
......@@ -260,7 +264,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
PreprocessorDefinitions="QUARTZCORE_DLL"
ForcedIncludeFiles=""
/>
<Tool
......@@ -315,7 +320,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
PreprocessorDefinitions="QUARTZCORE_DLL"
ForcedIncludeFiles=""
/>
<Tool
......@@ -22047,6 +22053,10 @@
RelativePath="..\platform\win\TemporaryLinkStubs.cpp"
>
</File>
<File
RelativePath="..\platform\graphics\TextRenderingMode.h"
>
</File>
<File
RelativePath="..\platform\win\WCDataObject.cpp"
>
......@@ -22109,6 +22119,68 @@
RelativePath="..\platform\win\WCDataObject.h"
>
</File>
<File
RelativePath="..\WebCorePrefix.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Internal|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Cairo|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_Cairo|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_All|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\WebCorePrefix.h"
>
</File>
<File
RelativePath="..\platform\win\WebCoreTextRenderer.cpp"
>
......@@ -22393,6 +22465,18 @@
RelativePath="..\platform\graphics\GraphicsContextPrivate.h"
>
</File>
<File
RelativePath="..\platform\graphics\GraphicsLayer.cpp"
>
</File>
<File
RelativePath="..\platform\graphics\GraphicsLayer.h"
>
</File>
<File
RelativePath="..\platform\graphics\GraphicsLayerClient.h"
>
</File>
<File
RelativePath="..\platform\graphics\GraphicsTypes.cpp"
>
......@@ -22892,6 +22976,14 @@
RelativePath="..\platform\graphics\win\GraphicsContextWin.cpp"
>
</File>
<File
RelativePath="..\platform\graphics\win\GraphicsLayerCACF.cpp"
>
</File>
<File
RelativePath="..\platform\graphics\win\GraphicsLayerCACF.h"
>
</File>
<File
RelativePath="..\platform\graphics\win\IconWin.cpp"
>
......@@ -23088,6 +23180,30 @@
RelativePath="..\platform\graphics\win\UniscribeController.h"
>
</File>
<File
RelativePath="..\platform\graphics\win\WKCACFContextFlusher.cpp"
>
</File>
<File
RelativePath="..\platform\graphics\win\WKCACFContextFlusher.h"
>
</File>
<File
RelativePath="..\platform\graphics\win\WKCACFLayer.cpp"
>
</File>
<File
RelativePath="..\platform\graphics\win\WKCACFLayer.h"
>
</File>
<File
RelativePath="..\platform\graphics\win\WKCACFLayerRenderer.cpp"
>
</File>
<File
RelativePath="..\platform\graphics\win\WKCACFLayerRenderer.h"
>
</File>
</Filter>
<Filter
Name="cg"
......@@ -27114,6 +27230,22 @@
RelativePath="..\rendering\RenderLayer.h"
>
</File>
<File
RelativePath="..\rendering\RenderLayerBacking.cpp"
>
</File>
<File
RelativePath="..\rendering\RenderLayerBacking.h"
>
</File>
<File
RelativePath="..\rendering\RenderLayerCompositor.cpp"
>
</File>
<File
RelativePath="..\rendering\RenderLayerCompositor.h"
>
</File>
<File
RelativePath="..\rendering\RenderLineBoxList.cpp"
>
......@@ -42927,72 +43059,6 @@
RelativePath="..\config.h"
>
</File>
<File
RelativePath="..\platform\graphics\TextRenderingMode.h"
>
</File>
<File
RelativePath="..\WebCorePrefix.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Internal|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Cairo|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_Cairo|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_All|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
DisableSpecificWarnings="4819"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\WebCorePrefix.h"
>
</File>
</Files>
<Globals>
</Globals>
......
......@@ -8,7 +8,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)..\svg\animation&quot;"
PreprocessorDefinitions="__WIN32__;WEBCORE_CONTEXT_MENUS;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DATALIST;ENABLE_DOM_STORAGE;ENABLE_EVENTSOURCE;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DATALIST;ENABLE_DOM_STORAGE;ENABLE_EVENTSOURCE;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebCorePrefix.h"
ForcedIncludeFiles="WebCorePrefix.h"
......
......@@ -478,8 +478,9 @@ bool FrameView::syncCompositingStateRecursive()
}
}
return allSubframesSynced;
#endif // USE(ACCELERATED_COMPOSITING)
#else // USE(ACCELERATED_COMPOSITING)
return true;
#endif
}
void FrameView::didMoveOnscreen()
......
......@@ -53,6 +53,12 @@ typedef CALayer* NativeLayer;
typedef void* PlatformLayer;
typedef void* NativeLayer;
#endif
#elif PLATFORM(WIN)
namespace WebCore {
class WKCACFLayer;
typedef WKCACFLayer PlatformLayer;
typedef void* NativeLayer;
}
#else
typedef void* PlatformLayer;
typedef void* NativeLayer;
......
This diff is collapsed.
/*
* Copyright (C) 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef GraphicsLayerCACF_h_
#define GraphicsLayerCACF_h_
#if USE(ACCELERATED_COMPOSITING)
#include "GraphicsLayer.h"
#include "GraphicsContext.h"
#include <wtf/RetainPtr.h>
namespace WebCore {
class WKCACFLayer;
class GraphicsLayerCACF : public GraphicsLayer {
public:
GraphicsLayerCACF(GraphicsLayerClient*);
virtual ~GraphicsLayerCACF();
virtual void setName(const String& inName);
// for hosting this GraphicsLayer in a native layer hierarchy
virtual NativeLayer nativeLayer() const;
virtual void addChild(GraphicsLayer *layer);
virtual void addChildAtIndex(GraphicsLayer *layer, int index);
virtual void addChildAbove(GraphicsLayer *layer, GraphicsLayer *sibling);
virtual void addChildBelow(GraphicsLayer *layer, GraphicsLayer *sibling);
virtual bool replaceChild(GraphicsLayer *oldChild, GraphicsLayer *newChild);
virtual void removeFromParent();
virtual void setPosition(const FloatPoint& inPoint);
virtual void setAnchorPoint(const FloatPoint3D& inPoint);
virtual void setSize(const FloatSize& inSize);
virtual void setTransform(const TransformationMatrix&);
virtual void setChildrenTransform(const TransformationMatrix&);
virtual void setPreserves3D(bool);
virtual void setMasksToBounds(bool);
virtual void setDrawsContent(bool);
virtual void setBackgroundColor(const Color&);
virtual void clearBackgroundColor();
virtual void setContentsOpaque(bool);
virtual void setBackfaceVisibility(bool);
virtual void setOpacity(float opacity);
virtual void setNeedsDisplay();
virtual void setNeedsDisplayInRect(const FloatRect&);
virtual void setContentsRect(const IntRect&);
virtual void setContentsToImage(Image*);
virtual void setContentsToVideo(PlatformLayer*);
virtual PlatformLayer* platformLayer() const;
virtual void setDebugBackgroundColor(const Color&);
virtual void setDebugBorder(const Color&, float borderWidth);
virtual void setGeometryOrientation(CompositingCoordinatesOrientation);
void notifySyncRequired() { if (m_client) m_client->notifySyncRequired(this); }
private:
void updateOpacityOnLayer();
WKCACFLayer* primaryLayer() const { return m_transformLayer.get() ? m_transformLayer.get() : m_layer.get(); }
WKCACFLayer* hostLayerForSublayers() const;
WKCACFLayer* layerForSuperlayer() const;
CompositingCoordinatesOrientation defaultContentsOrientation() const;
void updateSublayerList();
void updateLayerPosition();
void updateLayerSize();
void updateAnchorPoint();
void updateTransform();
void updateChildrenTransform();
void updateMasksToBounds();
void updateContentsOpaque();
void updateBackfaceVisibility();
void updateLayerPreserves3D();
void updateLayerDrawsContent();
void updateLayerBackgroundColor();
void updateContentsImage();
void updateContentsVideo();
void updateContentsRect();
void updateGeometryOrientation();
void setupContentsLayer(WKCACFLayer*);
WKCACFLayer* contentsLayer() const { return m_contentsLayer.get(); }
RefPtr<WKCACFLayer> m_layer;
RefPtr<WKCACFLayer> m_transformLayer;
RefPtr<WKCACFLayer> m_contentsLayer;
enum ContentsLayerPurpose {
NoContentsLayer = 0,
ContentsLayerForImage,
ContentsLayerForVideo
};
ContentsLayerPurpose m_contentsLayerPurpose;
bool m_contentsLayerHasBackgroundColor : 1;
RetainPtr<CGImageRef> m_pendingContentsImage;
};
} // namespace WebCore
#endif // USE(ACCELERATED_COMPOSITING)
#endif // GraphicsLayerCACF_h_
/*
* Copyright (C) 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#if USE(ACCELERATED_COMPOSITING)
#include "WKCACFContextFlusher.h"
#include <wtf/StdLibExtras.h>
#include <QuartzCore/CACFContext.h>
namespace WebCore {