Delay load DLLs for accelerated compositing
authorcmarrin@apple.com <cmarrin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Dec 2009 18:29:01 +0000 (18:29 +0000)
committercmarrin@apple.com <cmarrin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Dec 2009 18:29:01 +0000 (18:29 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=31856

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@52006 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh
JavaScriptCore/wtf/Platform.h
WebCore/ChangeLog
WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
WebCore/platform/graphics/win/WKCACFLayer.cpp
WebCore/platform/graphics/win/WKCACFLayer.h
WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
WebKit/win/ChangeLog
WebKit/win/WebView.cpp
WebKitLibraries/ChangeLog
WebKitLibraries/win/bin/QuartzCoreInterface.dll [new file with mode: 0755]
WebKitLibraries/win/include/QuartzCoreInterface/QuartzCoreInterface.h [new file with mode: 0644]
WebKitLibraries/win/lib/QuartzCoreInterface.lib [new file with mode: 0755]

index d1e1e66..8834665 100644 (file)
@@ -1,3 +1,19 @@
+2009-12-11  Chris Marrin  <cmarrin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Add check for presence of QuartzCore headers
+        https://bugs.webkit.org/show_bug.cgi?id=31856
+        
+        The script now checks for the presence of QuartzCore.h. If present
+        it will turn on ACCELERATED_COMPOSITING and 3D_RENDERING to enable
+        HW compositing on Windows. The script writes QuartzCorePresent.h to
+        the build directory which has a define telling whether QuartzCore is 
+        present.
+
+        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
+        * wtf/Platform.h:
+
 2009-12-11  Kent Tamura  <tkent@chromium.org>
 
         Reviewed by Darin Adler.
index 6d6b588..2d460c6 100755 (executable)
@@ -1,5 +1,13 @@
 #!/usr/bin/bash
 
+# Determine if we have QuartzCore so we can turn on
+if [ -f ${WEBKITLIBRARIESDIR}/include/QuartzCore/QuartzCore.h ]
+then
+       echo "#define QUARTZCORE_PRESENT 1" > ${WEBKITOUTPUTDIR}/Include/QuartzCorePresent.h
+else
+       echo "#define QUARTZCORE_PRESENT 0" > ${WEBKITOUTPUTDIR}/Include/QuartzCorePresent.h
+fi
+
 NUMCPUS=`../../../WebKitTools/Scripts/num-cpus`
 
 XSRCROOT="`pwd`/../.."
index 918cb47..72ec4b8 100644 (file)
@@ -915,8 +915,15 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
 #define WTF_USE_ACCELERATED_COMPOSITING 1
 #endif
 
+/* FIXME: Defining ENABLE_3D_RENDERING here isn't really right, but it's always used with
+   with WTF_USE_ACCELERATED_COMPOSITING, and it allows the feature to be turned on and
+   off in one place. */
 #if PLATFORM(WIN)
-#define WTF_USE_ACCELERATED_COMPOSITING 0
+#include "QuartzCorePresent.h"
+#if QUARTZCORE_PRESENT
+#define WTF_USE_ACCELERATED_COMPOSITING 1
+#define ENABLE_3D_RENDERING 1
+#endif
 #endif
 
 #if COMPILER(GCC)
index 9673822..ebe8c5a 100644 (file)
@@ -1,3 +1,40 @@
+<<<<<<< .mine
+2009-12-11  Chris Marrin  <cmarrin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Delay load DLLs for accelerated compositing
+        https://bugs.webkit.org/show_bug.cgi?id=31856
+        
+        Change calls that use the data export symbols from
+        QuartzCore to use the functions in QuartzCoreInterface.
+        This allows QuartzCore to be delay loaded.
+
+        * platform/graphics/win/GraphicsLayerCACF.cpp:
+        (WebCore::GraphicsLayerCACF::GraphicsLayerCACF):
+        (WebCore::GraphicsLayerCACF::updateLayerPreserves3D):
+        (WebCore::GraphicsLayerCACF::updateContentsImage):
+        * platform/graphics/win/WKCACFLayer.cpp:
+        (WebCore::toCACFLayerType):
+        (WebCore::toCACFContentsGravityType):
+        (WebCore::fromCACFContentsGravityType):
+        (WebCore::toCACFFilterType):
+        (WebCore::fromCACFFilterType):
+        (WebCore::WKCACFLayer::create):
+        (WebCore::WKCACFLayer::WKCACFLayer):
+        (WebCore::WKCACFLayer::setContentsGravity):
+        (WebCore::WKCACFLayer::contentsGravity):
+        (WebCore::WKCACFLayer::setMagnificationFilter):
+        (WebCore::WKCACFLayer::magnificationFilter):
+        (WebCore::WKCACFLayer::setMinificationFilter):
+        (WebCore::WKCACFLayer::minificationFilter):
+        * platform/graphics/win/WKCACFLayer.h:
+        (WebCore::WKCACFLayer::):
+        * platform/graphics/win/WKCACFLayerRenderer.cpp:
+        (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable):
+        (WebCore::WKCACFLayerRenderer::createRenderer):
+
+=======
 2009-12-11  Steve Block  <steveblock@google.com>
 
         Reviewed by Darin Fisher.
@@ -11,6 +48,7 @@
         * platform/network/android/ResourceRequestAndroid.cpp: Added.
         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Android-specific implementation.
 
+>>>>>>> .r52005
 2009-12-11  Kent Tamura  <tkent@chromium.org>
 
         Reviewed by Darin Fisher.
index 22faeb8..5ec90b8 100644 (file)
@@ -36,6 +36,7 @@
 #include "PlatformString.h"
 #include "SystemTime.h"
 #include "WKCACFLayer.h"
+#include <QuartzCoreInterface/QuartzCoreInterface.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/StringExtras.h>
 
@@ -123,7 +124,7 @@ GraphicsLayerCACF::GraphicsLayerCACF(GraphicsLayerClient* client)
     , m_contentsLayerPurpose(NoContentsLayer)
     , m_contentsLayerHasBackgroundColor(false)
 {
-    m_layer = WKCACFLayer::create(kCACFLayer, this);
+    m_layer = WKCACFLayer::create(WKCACFLayer::Layer, this);
     
     updateDebugIndicators();
 }
@@ -536,7 +537,7 @@ void GraphicsLayerCACF::updateLayerPreserves3D()
 {
     if (m_preserves3D && !m_transformLayer) {
         // Create the transform layer.
-        m_transformLayer = WKCACFLayer::create(kCACFTransformLayer, this);
+        m_transformLayer = WKCACFLayer::create(WKCACFLayer::TransformLayer, this);
 
 #ifndef NDEBUG
         m_transformLayer->setName(String().format("Transform Layer CATransformLayer(%p) GraphicsLayer(%p)", m_transformLayer.get(), this));
@@ -552,7 +553,7 @@ void GraphicsLayerCACF::updateLayerPreserves3D()
         m_layer->setPosition(point);
 
         m_layer->setAnchorPoint(CGPointMake(0.5f, 0.5f));
-        m_layer->setTransform(CATransform3DIdentity);
+        m_layer->setTransform(wkqcCATransform3DIdentity());
         
         // Set the old layer to opacity of 1. Further down we will set the opacity on the transform layer.
         m_layer->setOpacity(1);
@@ -609,7 +610,7 @@ void GraphicsLayerCACF::updateContentsImage()
 {
     if (m_pendingContentsImage) {
         if (!m_contentsLayer.get()) {
-            RefPtr<WKCACFLayer> imageLayer = WKCACFLayer::create(kCACFLayer, this);
+            RefPtr<WKCACFLayer> imageLayer = WKCACFLayer::create(WKCACFLayer::Layer, this);
 #ifndef NDEBUG
             imageLayer->setName("Image Layer");
 #endif
@@ -620,7 +621,7 @@ void GraphicsLayerCACF::updateContentsImage()
 
         // FIXME: maybe only do trilinear if the image is being scaled down,
         // but then what if the layer size changes?
-        m_contentsLayer->setMinificationFilter(kCACFFilterTrilinear);
+        m_contentsLayer->setMinificationFilter(WKCACFLayer::Trilinear);
         m_contentsLayer->setContents(m_pendingContentsImage.get());
         m_pendingContentsImage = 0;
         
index 21e010d..9a1aabc 100644 (file)
 #include "WKCACFLayer.h"
 
 #include "WKCACFContextFlusher.h"
+#include "WKCACFLayerRenderer.h"
 
 #include <stdio.h>
 #include <QuartzCore/CACFContext.h>
 #include <QuartzCore/CARender.h>
+#include <QuartzCoreInterface/QuartzCoreInterface.h>
 
-#pragma comment(lib, "QuartzCore")\r
+#pragma comment(lib, "QuartzCore")
+#pragma comment(lib, "QuartzCoreInterface")
 
 namespace WebCore {
 
@@ -47,11 +50,135 @@ static void displayInContext(CACFLayerRef layer, CGContextRef context)
     WKCACFLayer::layer(layer)->display(context);
 }
 
+#define STATIC_CACF_STRING(name) \
+    static CFStringRef name() \
+    { \
+        static CFStringRef name = wkqcCFStringRef(wkqc##name); \
+        return name; \
+    }
+
+STATIC_CACF_STRING(kCACFLayer)
+STATIC_CACF_STRING(kCACFTransformLayer)
+STATIC_CACF_STRING(kCACFGravityCenter)
+STATIC_CACF_STRING(kCACFGravityTop)
+STATIC_CACF_STRING(kCACFGravityBottom)
+STATIC_CACF_STRING(kCACFGravityLeft)
+STATIC_CACF_STRING(kCACFGravityRight)
+STATIC_CACF_STRING(kCACFGravityTopLeft)
+STATIC_CACF_STRING(kCACFGravityTopRight)
+STATIC_CACF_STRING(kCACFGravityBottomLeft)
+STATIC_CACF_STRING(kCACFGravityBottomRight)
+STATIC_CACF_STRING(kCACFGravityResize)
+STATIC_CACF_STRING(kCACFGravityResizeAspect)
+STATIC_CACF_STRING(kCACFGravityResizeAspectFill)
+STATIC_CACF_STRING(kCACFFilterLinear)
+STATIC_CACF_STRING(kCACFFilterNearest)
+STATIC_CACF_STRING(kCACFFilterTrilinear)
+STATIC_CACF_STRING(kCACFFilterLanczos)
+
+static CFStringRef toCACFLayerType(WKCACFLayer::LayerType type)
+{
+    switch (type) {
+    case WKCACFLayer::Layer: return kCACFLayer();
+    case WKCACFLayer::TransformLayer: return kCACFTransformLayer();
+    default: return 0;
+    }
+}
+
+static CFStringRef toCACFContentsGravityType(WKCACFLayer::ContentsGravityType type)
+{
+    switch (type) {
+    case WKCACFLayer::Center: return kCACFGravityCenter();
+    case WKCACFLayer::Top: return kCACFGravityTop();
+    case WKCACFLayer::Bottom: return kCACFGravityBottom();
+    case WKCACFLayer::Left: return kCACFGravityLeft();
+    case WKCACFLayer::Right: return kCACFGravityRight();
+    case WKCACFLayer::TopLeft: return kCACFGravityTopLeft();
+    case WKCACFLayer::TopRight: return kCACFGravityTopRight();
+    case WKCACFLayer::BottomLeft: return kCACFGravityBottomLeft();
+    case WKCACFLayer::BottomRight: return kCACFGravityBottomRight();
+    case WKCACFLayer::Resize: return kCACFGravityResize();
+    case WKCACFLayer::ResizeAspect: return kCACFGravityResizeAspect();
+    case WKCACFLayer::ResizeAspectFill: return kCACFGravityResizeAspectFill();
+    default: return 0;
+    }
+}
+
+static WKCACFLayer::ContentsGravityType fromCACFContentsGravityType(CFStringRef string)
+{
+    if (CFEqual(string, kCACFGravityTop()))
+        return WKCACFLayer::Top;
+
+    if (CFEqual(string, kCACFGravityBottom()))
+        return WKCACFLayer::Bottom;
+
+    if (CFEqual(string, kCACFGravityLeft()))
+        return WKCACFLayer::Left;
+
+    if (CFEqual(string, kCACFGravityRight()))
+        return WKCACFLayer::Right;
+
+    if (CFEqual(string, kCACFGravityTopLeft()))
+        return WKCACFLayer::TopLeft;
+
+    if (CFEqual(string, kCACFGravityTopRight()))
+        return WKCACFLayer::TopRight;
+
+    if (CFEqual(string, kCACFGravityBottomLeft()))
+        return WKCACFLayer::BottomLeft;
+
+    if (CFEqual(string, kCACFGravityBottomRight()))
+        return WKCACFLayer::BottomRight;
+
+    if (CFEqual(string, kCACFGravityResize()))
+        return WKCACFLayer::Resize;
+
+    if (CFEqual(string, kCACFGravityResizeAspect()))
+        return WKCACFLayer::ResizeAspect;
+
+    if (CFEqual(string, kCACFGravityResizeAspectFill()))
+        return WKCACFLayer::ResizeAspectFill;
+
+    return WKCACFLayer::Center;
+}
+
+static CFStringRef toCACFFilterType(WKCACFLayer::FilterType type)
+{
+    switch (type) {
+    case WKCACFLayer::Linear: return kCACFFilterLinear();
+    case WKCACFLayer::Nearest: return kCACFFilterNearest();
+    case WKCACFLayer::Trilinear: return kCACFFilterTrilinear();
+    case WKCACFLayer::Lanczos: return kCACFFilterLanczos();
+    default: return 0;
+    }
+}
+
+static WKCACFLayer::FilterType fromCACFFilterType(CFStringRef string)
+{
+    if (CFEqual(string, kCACFFilterNearest()))
+        return WKCACFLayer::Nearest;
+
+    if (CFEqual(string, kCACFFilterTrilinear()))
+        return WKCACFLayer::Trilinear;
+
+    if (CFEqual(string, kCACFFilterLanczos()))
+        return WKCACFLayer::Lanczos;
+
+    return WKCACFLayer::Linear;
+}
+
+PassRefPtr<WKCACFLayer> WKCACFLayer::create(LayerType type, GraphicsLayerCACF* owner)
+{
+    if (!WKCACFLayerRenderer::acceleratedCompositingAvailable())
+        return 0;
+    return adoptRef(new WKCACFLayer(type, owner));
+}
+
 // FIXME: It might be good to have a way of ensuring that all WKCACFLayers eventually
 // get destroyed in debug builds. A static counter could accomplish this pretty easily.
 
-WKCACFLayer::WKCACFLayer(CFStringRef className, GraphicsLayerCACF* owner)
-    : m_layer(AdoptCF, CACFLayerCreate(className))
+WKCACFLayer::WKCACFLayer(LayerType type, GraphicsLayerCACF* owner)
+    : m_layer(AdoptCF, CACFLayerCreate(toCACFLayerType(type)))
     , m_needsDisplayOnBoundsChange(false)
     , m_owner(owner)
 {
@@ -291,6 +418,39 @@ void WKCACFLayer::setFrame(const CGRect& rect)
         setNeedsDisplay();
 }
 
+void WKCACFLayer::setContentsGravity(ContentsGravityType type)
+{
+    CACFLayerSetContentsGravity(layer(), toCACFContentsGravityType(type));
+    setNeedsCommit();
+}
+
+WKCACFLayer::ContentsGravityType WKCACFLayer::contentsGravity() const
+{
+    return fromCACFContentsGravityType(CACFLayerGetContentsGravity(layer()));
+}
+
+void WKCACFLayer::setMagnificationFilter(FilterType type)
+{
+    CACFLayerSetMagnificationFilter(layer(), toCACFFilterType(type));
+    setNeedsCommit();
+}
+
+WKCACFLayer::FilterType WKCACFLayer::magnificationFilter() const
+{
+    return fromCACFFilterType(CACFLayerGetMagnificationFilter(layer()));
+}
+
+void WKCACFLayer::setMinificationFilter(FilterType type)
+{
+    CACFLayerSetMinificationFilter(layer(), toCACFFilterType(type));
+    setNeedsCommit();
+}
+
+WKCACFLayer::FilterType WKCACFLayer::minificationFilter() const
+{
+    return fromCACFFilterType(CACFLayerGetMinificationFilter(layer()));
+}
+
 WKCACFLayer* WKCACFLayer::rootLayer() const
 {
     WKCACFLayer* layer = const_cast<WKCACFLayer*>(this);
index 6655f7a..6892c6e 100644 (file)
@@ -50,7 +50,12 @@ class WKCACFTimingFunction;
 
 class WKCACFLayer : public RefCounted<WKCACFLayer> {
 public:
-    static PassRefPtr<WKCACFLayer> create(CFStringRef className, GraphicsLayerCACF* owner = 0) { return adoptRef(new WKCACFLayer(className, owner)); }
+    enum LayerType { Layer, TransformLayer };
+    enum FilterType { Linear, Nearest, Trilinear, Lanczos };
+    enum ContentsGravityType { Center, Top, Bottom, Left, Right, TopLeft, TopRight, 
+                               BottomLeft, BottomRight, Resize, ResizeAspect, ResizeAspectFill };
+
+    static PassRefPtr<WKCACFLayer> create(LayerType, GraphicsLayerCACF* owner = 0);
     static WKCACFLayer* layer(CACFLayerRef layer) { return static_cast<WKCACFLayer*>(CACFLayerGetUserData(layer)); }
 
     ~WKCACFLayer();
@@ -142,8 +147,8 @@ public:
     void setContentsRect(const CGRect& contentsRect) { CACFLayerSetContentsRect(layer(), contentsRect); setNeedsCommit(); }
     CGRect contentsRect() const { return CACFLayerGetContentsRect(layer()); }
 
-    void setContentsGravity(CFStringRef str) { CACFLayerSetContentsGravity(layer(), str); setNeedsCommit(); }
-    CFStringRef contentsGravity() const { return CACFLayerGetContentsGravity(layer()); }
+    void setContentsGravity(ContentsGravityType);
+    ContentsGravityType contentsGravity() const;
         
     void setDoubleSided(bool b) { CACFLayerSetDoubleSided(layer(), b); setNeedsCommit(); }
     bool doubleSided() const { return CACFLayerIsDoubleSided(layer()); }
@@ -163,11 +168,11 @@ public:
     void setMasksToBounds(bool b) { CACFLayerSetMasksToBounds(layer(), b); }
     bool masksToBounds() const { return CACFLayerGetMasksToBounds(layer()); }
 
-    void setMagnificationFilter(const String& string) { CACFLayerSetMagnificationFilter(layer(), RetainPtr<CFStringRef>(AdoptCF, string.createCFString()).get()); }
-    String magnificationFilter() const { return CACFLayerGetMagnificationFilter(layer()); }
+    void setMagnificationFilter(FilterType);
+    FilterType magnificationFilter() const;
 
-    void setMinificationFilter(const String& string) { CACFLayerSetMinificationFilter(layer(), RetainPtr<CFStringRef>(AdoptCF, string.createCFString()).get()); }
-    String minificationFilter() const { return CACFLayerGetMinificationFilter(layer()); }
+    void setMinificationFilter(FilterType);
+    FilterType minificationFilter() const;
 
     void setMinificationFilterBias(float bias) { CACFLayerSetMinificationFilterBias(layer(), bias); }
     float minificationFilterBias() const { return CACFLayerGetMinificationFilterBias(layer()); }
@@ -218,9 +223,9 @@ public:
     void setGeometryFlipped(bool flipped) { CACFLayerSetGeometryFlipped(layer(), flipped); setNeedsCommit(); }
     bool geometryFlipped() const { return CACFLayerIsGeometryFlipped(layer()); }
 
-    WKCACFLayer(CFStringRef className, GraphicsLayerCACF* owner);
-
 private:
+    WKCACFLayer(LayerType, GraphicsLayerCACF* owner);
+
     void setNeedsCommit();
     CACFLayerRef layer() const { return m_layer.get(); }
     size_t numSublayers() const
index 9fbd0fc..23670b2 100644 (file)
 #include <CoreGraphics/CGSRegion.h>
 #include <QuartzCore/CACFContext.h>
 #include <QuartzCore/CARenderOGL.h>
+#include <QuartzCoreInterface/QuartzCoreInterface.h>
 #include <wtf/HashMap.h>
 #include <wtf/OwnArrayPtr.h>
 #include <d3d9.h>
 #include <d3dx9.h>
 #include <dxerr9.h>
 
-#pragma comment(lib, "d3d9")\r
-#pragma comment(lib, "d3dx9")\r
-#pragma comment(lib, "QuartzCore")\r
+#pragma comment(lib, "d3d9")
+#pragma comment(lib, "d3dx9")
+#pragma comment(lib, "QuartzCore")
 
 static IDirect3D9* s_d3d = 0;
 static IDirect3D9* d3d()
@@ -90,29 +91,29 @@ static D3DPRESENT_PARAMETERS initialPresentationParameters()
     return parameters;
 }
 
-bool WKCACFLayerRenderer::acceleratedCompositingAvailable()\r
-{\r
-    static bool available;\r
-    static bool tested;\r
-\r
-    if (tested)\r
-        return available;\r
-\r
-    tested = true;\r
-    HMODULE library = LoadLibrary(TEXT("d3d9.dll"));\r
-    if (!library)\r
-        return false;\r
-\r
-    FreeLibrary(library);\r
-    library = LoadLibrary(TEXT("QuartzCore.dll"));\r
-    if (!library)\r
-        return false;\r
-\r
-    FreeLibrary(library);\r
-    available = true;\r
-    return available;\r
-}\r
-\r
+bool WKCACFLayerRenderer::acceleratedCompositingAvailable()
+{
+    static bool available;
+    static bool tested;
+
+    if (tested)
+        return available;
+
+    tested = true;
+    HMODULE library = LoadLibrary(TEXT("d3d9.dll"));
+    if (!library)
+        return false;
+
+    FreeLibrary(library);
+    library = LoadLibrary(TEXT("QuartzCore.dll"));
+    if (!library)
+        return false;
+
+    FreeLibrary(library);
+    available = true;
+    return available;
+}
+
 void WKCACFLayerRenderer::didFlushContext(CACFContextRef context)
 {
     WKCACFLayerRenderer* window = windowsForContexts().get(context);
@@ -225,11 +226,11 @@ void WKCACFLayerRenderer::createRenderer()
     windowsForContexts().set(m_context.get(), this);
 
     m_renderContext = static_cast<CARenderContext*>(CACFContextGetRenderContext(m_context.get()));
-    m_renderer = CARenderOGLNew(&kCARenderDX9Callbacks, m_d3dDevice.get(), 0);
+    m_renderer = CARenderOGLNew(wkqcCARenderOGLCallbacks(wkqckCARenderDX9Callbacks), m_d3dDevice.get(), 0);
 
     // Create the root hierarchy
-    m_rootLayer = WKCACFLayer::create(kCACFLayer);
-    m_scrollLayer = WKCACFLayer::create(kCACFLayer);
+    m_rootLayer = WKCACFLayer::create(WKCACFLayer::Layer);
+    m_scrollLayer = WKCACFLayer::create(WKCACFLayer::Layer);
 
     m_rootLayer->addSublayer(m_scrollLayer);
     m_scrollLayer->setMasksToBounds(true);
index 95705a9..6904aa8 100644 (file)
@@ -1,3 +1,17 @@
+2009-12-11  Chris Marrin  <cmarrin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Delay load DLLs for accelerated compositing
+        https://bugs.webkit.org/show_bug.cgi?id=31856
+        
+        If the DLLs (d3d9 and QuartzCore). are not present it
+        turns off accelerated compositing and avoids calling 
+        any of the functions in the DLLs.
+
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2009-12-10  Jon Honeycutt  <jhoneycutt@apple.com>
 
         Pass more information about a plug-in to the PluginHalterDelegate
index d98d390..07f8295 100644 (file)
@@ -4504,6 +4504,10 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
         return hr;
     settings->setPluginAllowedRunTime(runTime);
 
+#if USE(ACCELERATED_COMPOSITING)
+    settings->setAcceleratedCompositingEnabled(WKCACFLayerRenderer::acceleratedCompositingAvailable());
+#endif
+
 #if ENABLE(3D_CANVAS)
     settings->setExperimentalWebGLEnabled(true);
 #endif  // ENABLE(3D_CANVAS)
index a0f1cef..dce8322 100644 (file)
@@ -1,3 +1,19 @@
+2009-12-11  Chris Marrin  <cmarrin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Add QuartzCore build files to OpenSource tree
+        https://bugs.webkit.org/show_bug.cgi?id=31856
+        
+        This allows proper building and linking with QuartzCore
+        when present.
+
+        * win/bin: Added.
+        * win/bin/QuartzCoreInterface.dll: Added.
+        * win/include/QuartzCoreInterface: Added.
+        * win/include/QuartzCoreInterface/QuartzCoreInterface.h: Added.
+        * win/lib/QuartzCoreInterface.lib: Added.
+
 2009-12-07  Adam Roben  <aroben@apple.com>
 
         Windows build fix for checkouts with a space in the path
diff --git a/WebKitLibraries/win/bin/QuartzCoreInterface.dll b/WebKitLibraries/win/bin/QuartzCoreInterface.dll
new file mode 100755 (executable)
index 0000000..0b64349
Binary files /dev/null and b/WebKitLibraries/win/bin/QuartzCoreInterface.dll differ
diff --git a/WebKitLibraries/win/include/QuartzCoreInterface/QuartzCoreInterface.h b/WebKitLibraries/win/include/QuartzCoreInterface/QuartzCoreInterface.h
new file mode 100644 (file)
index 0000000..b3cef10
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ */
+
+#ifndef QuartzCoreInterface_h
+#define QuartzCoreInterface_h
+
+#ifdef QUARTZCOREINTERFACE_EXPORTS
+#define QUARTZCOREINTERFACE_API __declspec(dllexport)
+#else
+#define QUARTZCOREINTERFACE_API __declspec(dllimport)
+#endif
+
+// Interface to give access to QuartzCore data symbols.
+enum WKQCStringRefType { wkqckCACFLayer, wkqckCACFTransformLayer, wkqckCACFFilterLinear, wkqckCACFFilterNearest,
+                         wkqckCACFFilterTrilinear, wkqckCACFFilterLanczos, wkqckCACFGravityCenter, wkqckCACFGravityTop, 
+                         wkqckCACFGravityBottom, wkqckCACFGravityLeft, wkqckCACFGravityRight, wkqckCACFGravityTopLeft, 
+                         wkqckCACFGravityTopRight, wkqckCACFGravityBottomLeft, wkqckCACFGravityBottomRight, 
+                         wkqckCACFGravityResize, wkqckCACFGravityResizeAspect, wkqckCACFGravityResizeAspectFill };
+
+enum WKQCCARenderOGLCallbacksType { wkqckCARenderDX9Callbacks };
+
+typedef const struct __CFString * CFStringRef;
+typedef struct _CARenderOGLCallbacks CARenderOGLCallbacks;
+typedef struct CATransform3D CATransform3D;
+
+extern "C" {
+QUARTZCOREINTERFACE_API CFStringRef wkqcCFStringRef(WKQCStringRefType);
+QUARTZCOREINTERFACE_API const CARenderOGLCallbacks* wkqcCARenderOGLCallbacks(WKQCCARenderOGLCallbacksType);
+QUARTZCOREINTERFACE_API const CATransform3D& wkqcCATransform3DIdentity();
+}
+
+#endif // QuartzCoreInterface_h
diff --git a/WebKitLibraries/win/lib/QuartzCoreInterface.lib b/WebKitLibraries/win/lib/QuartzCoreInterface.lib
new file mode 100755 (executable)
index 0000000..0a556d3
Binary files /dev/null and b/WebKitLibraries/win/lib/QuartzCoreInterface.lib differ