Remove uses of CACFContextRef and CARender* from WebCore
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jul 2010 17:37:55 +0000 (17:37 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jul 2010 17:37:55 +0000 (17:37 +0000)
These types are now wrapped in a WKCACFContext type exported by
WebKitSystemInterface.

Fixes <http://webkit.org/b/43244>.

Reviewed by Sam Weinig.

WebCore:

* platform/graphics/win/WKCACFContextFlusher.cpp:
(WebCore::WKCACFContextFlusher::addContext):
(WebCore::WKCACFContextFlusher::removeContext):
(WebCore::WKCACFContextFlusher::flushAllContexts):
* platform/graphics/win/WKCACFContextFlusher.h:
Changed to use WKCACFContext. We don't retain/release the context when
putting it into/taking it out of the set. WKCACFContext is not a
ref-counted type, so we can't retain/release it, but the
retain/release was also unnecessary as WKCACFLayerRenderer calls
removeContext before the context is destroyed.

* platform/graphics/win/WKCACFLayer.cpp:
(WebCore::WKCACFLayer::becomeRootLayerForContext):
* platform/graphics/win/WKCACFLayer.h:
Changed to use WKCACFContext.

* platform/graphics/win/WKCACFLayerRenderer.cpp:
(WebCore::WKCACFLayerRenderer::didFlushContext):
(WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
(WebCore::WKCACFLayerRenderer::~WKCACFLayerRenderer):
(WebCore::WKCACFLayerRenderer::layerTreeDidChange):
(WebCore::WKCACFLayerRenderer::createRenderer):
(WebCore::WKCACFLayerRenderer::destroyRenderer):
(WebCore::WKCACFLayerRenderer::render): Also replaced uses of
CGSRegion with WebKitSystemInterface functions/types.
(WebCore::WKCACFLayerRenderer::resetDevice):
* platform/graphics/win/WKCACFLayerRenderer.h:
Replaced our CACFContextRef, CARenderContext, and CARenderOGLContext
with a single WKCACFContext, which wraps all three. We hold a bare
pointer to it and destroy it in our destructor.

WebKitLibraries:

Add WKCACFContext and related functions

Also added some functions used by WKCAImageQueue.

* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib/WebKitSystemInterface.lib:
* win/lib/WebKitSystemInterface_debug.lib:

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

WebCore/ChangeLog
WebCore/platform/graphics/win/WKCACFContextFlusher.cpp
WebCore/platform/graphics/win/WKCACFContextFlusher.h
WebCore/platform/graphics/win/WKCACFLayer.cpp
WebCore/platform/graphics/win/WKCACFLayer.h
WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
WebCore/platform/graphics/win/WKCACFLayerRenderer.h
WebKitLibraries/ChangeLog
WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
WebKitLibraries/win/lib/WebKitSystemInterface.lib
WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib

index b241f56..d70172d 100644 (file)
@@ -1,5 +1,47 @@
 2010-07-30  Adam Roben  <aroben@apple.com>
 
+        Remove uses of CACFContextRef and CARender* from WebCore
+
+        These types are now wrapped in a WKCACFContext type exported by
+        WebKitSystemInterface.
+
+        Fixes <http://webkit.org/b/43244>.
+
+        Reviewed by Sam Weinig.
+
+        * platform/graphics/win/WKCACFContextFlusher.cpp:
+        (WebCore::WKCACFContextFlusher::addContext):
+        (WebCore::WKCACFContextFlusher::removeContext):
+        (WebCore::WKCACFContextFlusher::flushAllContexts):
+        * platform/graphics/win/WKCACFContextFlusher.h:
+        Changed to use WKCACFContext. We don't retain/release the context when
+        putting it into/taking it out of the set. WKCACFContext is not a
+        ref-counted type, so we can't retain/release it, but the
+        retain/release was also unnecessary as WKCACFLayerRenderer calls
+        removeContext before the context is destroyed.
+
+        * platform/graphics/win/WKCACFLayer.cpp:
+        (WebCore::WKCACFLayer::becomeRootLayerForContext):
+        * platform/graphics/win/WKCACFLayer.h:
+        Changed to use WKCACFContext.
+
+        * platform/graphics/win/WKCACFLayerRenderer.cpp:
+        (WebCore::WKCACFLayerRenderer::didFlushContext):
+        (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
+        (WebCore::WKCACFLayerRenderer::~WKCACFLayerRenderer):
+        (WebCore::WKCACFLayerRenderer::layerTreeDidChange):
+        (WebCore::WKCACFLayerRenderer::createRenderer):
+        (WebCore::WKCACFLayerRenderer::destroyRenderer):
+        (WebCore::WKCACFLayerRenderer::render): Also replaced uses of
+        CGSRegion with WebKitSystemInterface functions/types.
+        (WebCore::WKCACFLayerRenderer::resetDevice):
+        * platform/graphics/win/WKCACFLayerRenderer.h:
+        Replaced our CACFContextRef, CARenderContext, and CARenderOGLContext
+        with a single WKCACFContext, which wraps all three. We hold a bare
+        pointer to it and destroy it in our destructor.
+
+2010-07-30  Adam Roben  <aroben@apple.com>
+
         Remove knowledge of WKCACFContextFlusher from WKCACFLayer
 
         Fixes <http://webkit.org/b/43248> WKCACFLayer shouldn't know about
index 1685a30..d75c854 100644 (file)
@@ -29,8 +29,8 @@
 
 #include "WKCACFContextFlusher.h"
 
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
 #include <wtf/StdLibExtras.h>
-#include <QuartzCore/CACFContext.h>
 
 namespace WebCore {
 
@@ -48,24 +48,18 @@ WKCACFContextFlusher::~WKCACFContextFlusher()
 {
 }
 
-void WKCACFContextFlusher::addContext(CACFContextRef context)
+void WKCACFContextFlusher::addContext(WKCACFContext* context)
 {
     ASSERT(context);
 
-    if (m_contexts.add(context).second)
-        CFRetain(context);
+    m_contexts.add(context);
 }
 
-void WKCACFContextFlusher::removeContext(CACFContextRef context)
+void WKCACFContextFlusher::removeContext(WKCACFContext* context)
 {
     ASSERT(context);
 
-    ContextSet::iterator found = m_contexts.find(context);
-    if (found == m_contexts.end())
-        return;
-
-    CFRelease(*found);
-    m_contexts.remove(found);
+    m_contexts.remove(context);
 }
 
 void WKCACFContextFlusher::flushAllContexts()
@@ -76,11 +70,8 @@ void WKCACFContextFlusher::flushAllContexts()
     contextsToFlush.swap(m_contexts);
 
     ContextSet::const_iterator end = contextsToFlush.end();
-    for (ContextSet::const_iterator it = contextsToFlush.begin(); it != end; ++it) {
-        CACFContextRef context = *it;
-        CACFContextFlush(context);
-        CFRelease(context);
-    }
+    for (ContextSet::const_iterator it = contextsToFlush.begin(); it != end; ++it)
+        wkCACFContextFlush(*it);
 }
 
 }
index 9ce76aa..17ec41d 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <wtf/HashSet.h>
 
-typedef struct _CACFContext* CACFContextRef;
+struct WKCACFContext;
 
 namespace WebCore {
 
@@ -40,8 +40,8 @@ class WKCACFContextFlusher : public Noncopyable {
 public:
     static WKCACFContextFlusher& shared();
 
-    void addContext(CACFContextRef);
-    void removeContext(CACFContextRef);
+    void addContext(WKCACFContext*);
+    void removeContext(WKCACFContext*);
 
     void flushAllContexts();
 
@@ -49,7 +49,7 @@ private:
     WKCACFContextFlusher();
     ~WKCACFContextFlusher();
 
-    typedef HashSet<CACFContextRef> ContextSet;
+    typedef HashSet<WKCACFContext*> ContextSet;
     ContextSet m_contexts;
 };
 
index b5f3427..416c497 100644 (file)
 #include "WKCACFLayer.h"
 
 #include "WKCACFLayerRenderer.h"
-#include <wtf/text/CString.h>
-
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
 #include <stdio.h>
-#include <QuartzCore/CACFContext.h>
-#include <QuartzCore/CARender.h>
-
-#ifndef NDEBUG
 #include <wtf/CurrentTime.h>
-#endif
+#include <wtf/text/CString.h>
 
 namespace WebCore {
 
@@ -165,9 +160,9 @@ WKCACFLayer::~WKCACFLayer()
     CACFLayerSetDisplayCallback(layer(), 0);
 }
 
-void WKCACFLayer::becomeRootLayerForContext(CACFContextRef context)
+void WKCACFLayer::becomeRootLayerForContext(WKCACFContext* context)
 {
-    CACFContextSetLayer(context, layer());
+    wkCACFContextSetLayer(context, layer());
     setNeedsCommit();
 }
 
index ed39297..ee19247 100644 (file)
@@ -42,6 +42,8 @@
 #include "PlatformString.h"
 #include "TransformationMatrix.h"
 
+struct WKCACFContext;
+
 namespace WebCore {
 
 class WKCACFLayer;
@@ -80,7 +82,7 @@ public:
     }
 
     // Makes this layer the root when the passed context is rendered
-    void becomeRootLayerForContext(CACFContextRef);
+    void becomeRootLayerForContext(WKCACFContext*);
 
     static RetainPtr<CFTypeRef> cfValue(float value) { return RetainPtr<CFTypeRef>(AdoptCF, CFNumberCreate(0, kCFNumberFloat32Type, &value)); }
     static RetainPtr<CFTypeRef> cfValue(const TransformationMatrix& value)
index 2a355c2..623d31a 100644 (file)
@@ -36,9 +36,7 @@
 #include "WKCACFContextFlusher.h"
 #include "WKCACFLayer.h"
 #include "WebCoreInstanceHandle.h"
-#include <CoreGraphics/CGSRegion.h>
-#include <QuartzCore/CACFContext.h>
-#include <QuartzCore/CARenderOGL.h>
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
 #include <wtf/HashMap.h>
 #include <wtf/OwnArrayPtr.h>
 #include <wtf/OwnPtr.h>
@@ -108,7 +106,7 @@ private:
     WKCACFLayerRenderer* m_renderer;
 };
 
-typedef HashMap<CACFContextRef, WKCACFLayerRenderer*> ContextToWindowMap;
+typedef HashMap<WKCACFContext*, WKCACFLayerRenderer*> ContextToWindowMap;
 
 static ContextToWindowMap& windowsForContexts()
 {
@@ -206,7 +204,7 @@ bool WKCACFLayerRenderer::acceleratedCompositingAvailable()
     return available;
 }
 
-void WKCACFLayerRenderer::didFlushContext(CACFContextRef context)
+void WKCACFLayerRenderer::didFlushContext(WKCACFContext* context)
 {
     WKCACFLayerRenderer* window = windowsForContexts().get(context);
     if (!window)
@@ -228,9 +226,7 @@ WKCACFLayerRenderer::WKCACFLayerRenderer(WKCACFLayerRendererClient* client)
     , m_rootLayer(WKCACFRootLayer::create(this))
     , m_scrollLayer(WKCACFLayer::create(WKCACFLayer::Layer))
     , m_clipLayer(WKCACFLayer::create(WKCACFLayer::Layer))
-    , m_context(AdoptCF, CACFContextCreate(0))
-    , m_renderContext(static_cast<CARenderContext*>(CACFContextGetRenderContext(m_context.get())))
-    , m_renderer(0)
+    , m_context(wkCACFContextCreate())
     , m_hostWindow(0)
     , m_renderTimer(this, &WKCACFLayerRenderer::renderTimerFired)
     , m_scrollPosition(0, 0)
@@ -238,7 +234,7 @@ WKCACFLayerRenderer::WKCACFLayerRenderer(WKCACFLayerRendererClient* client)
     , m_backingStoreDirty(false)
     , m_mustResetLostDeviceBeforeRendering(false)
 {
-    windowsForContexts().set(m_context.get(), this);
+    windowsForContexts().set(m_context, this);
 
     // Under the root layer, we have a clipping layer to clip the content,
     // that contains a scroll layer that we use for scrolling the content.
@@ -267,7 +263,7 @@ WKCACFLayerRenderer::WKCACFLayerRenderer(WKCACFLayerRendererClient* client)
 #endif
 
     if (m_context)
-        m_rootLayer->becomeRootLayerForContext(m_context.get());
+        m_rootLayer->becomeRootLayerForContext(m_context);
 
 #ifndef NDEBUG
     char* printTreeFlag = getenv("CA_PRINT_TREE");
@@ -278,6 +274,7 @@ WKCACFLayerRenderer::WKCACFLayerRenderer(WKCACFLayerRendererClient* client)
 WKCACFLayerRenderer::~WKCACFLayerRenderer()
 {
     destroyRenderer();
+    wkCACFContextDestroy(m_context);
 }
 
 WKCACFLayer* WKCACFLayerRenderer::rootLayer() const
@@ -335,7 +332,7 @@ void WKCACFLayerRenderer::setRootChildLayer(WKCACFLayer* layer)
    
 void WKCACFLayerRenderer::layerTreeDidChange()
 {
-    WKCACFContextFlusher::shared().addContext(m_context.get());
+    WKCACFContextFlusher::shared().addContext(m_context);
     renderSoon();
 }
 
@@ -413,7 +410,7 @@ bool WKCACFLayerRenderer::createRenderer()
 
     m_d3dDevice->SetTransform(D3DTS_PROJECTION, &projection);
 
-    m_renderer = CARenderOGLNew(&kCARenderDX9Callbacks, m_d3dDevice.get(), 0);
+    wkCACFContextInitializeD3DDevice(m_context, m_d3dDevice.get());
 
     if (IsWindow(m_hostWindow))
         m_rootLayer->setBounds(bounds());
@@ -424,14 +421,10 @@ bool WKCACFLayerRenderer::createRenderer()
 void WKCACFLayerRenderer::destroyRenderer()
 {
     if (m_context) {
-        CACFContextSetLayer(m_context.get(), 0);
-        windowsForContexts().remove(m_context.get());
-        WKCACFContextFlusher::shared().removeContext(m_context.get());
+        windowsForContexts().remove(m_context);
+        WKCACFContextFlusher::shared().removeContext(m_context);
     }
 
-    if (m_renderer)
-        CARenderOGLDestroy(m_renderer);
-    m_renderer = 0;
     m_d3dDevice = 0;
     if (s_d3d)
         s_d3d->Release();
@@ -519,7 +512,7 @@ void WKCACFLayerRenderer::paint()
     render(dirtyRects);
 }
 
-void WKCACFLayerRenderer::render(const Vector<CGRect>& dirtyRects)
+void WKCACFLayerRenderer::render(const Vector<CGRect>& windowDirtyRects)
 {
     ASSERT(m_d3dDevice);
 
@@ -542,31 +535,21 @@ void WKCACFLayerRenderer::render(const Vector<CGRect>& dirtyRects)
     CFTimeInterval t = CACurrentMediaTime();
 
     // Give the renderer some space to use. This needs to be valid until the
-    // CARenderUpdateFinish() call below.
+    // wkCACFContextFinishUpdate() call below.
     char space[4096];
-    CARenderUpdate* u = CARenderUpdateBegin(space, sizeof(space), t, 0, 0, &bounds);
-    if (!u)
+    if (!wkCACFContextBeginUpdate(m_context, space, sizeof(space), t, bounds, windowDirtyRects.data(), windowDirtyRects.size()))
         return;
 
-    CARenderContextLock(m_renderContext);
-    CARenderUpdateAddContext(u, m_renderContext);
-    CARenderContextUnlock(m_renderContext);
-
-    for (size_t i = 0; i < dirtyRects.size(); ++i)
-        CARenderUpdateAddRect(u, &dirtyRects[i]);
-
     HRESULT err = S_OK;
     do {
-        CGSRegionObj rgn = CARenderUpdateCopyRegion(u);
+        // FIXME: don't need to clear dirty region if layer tree is opaque.
 
-        if (!rgn)
+        WKCACFUpdateRectEnumerator* e = wkCACFContextCopyUpdateRectEnumerator(m_context);
+        if (!e)
             break;
 
-        // FIXME: don't need to clear dirty region if layer tree is opaque.
-
         Vector<D3DRECT, 64> rects;
-        CGSRegionEnumeratorObj e = CGSRegionEnumerator(rgn);
-        for (const CGRect* r = CGSNextRect(e); r; r = CGSNextRect(e)) {
+        for (const CGRect* r = wkCACFUpdateRectEnumeratorNextRect(e); r; r = wkCACFUpdateRectEnumeratorNextRect(e)) {
             D3DRECT rect;
             rect.x1 = r->origin.x;
             rect.x2 = rect.x1 + r->size.width;
@@ -575,8 +558,7 @@ void WKCACFLayerRenderer::render(const Vector<CGRect>& dirtyRects)
 
             rects.append(rect);
         }
-        CGSReleaseRegionEnumerator(e);
-        CGSReleaseRegion(rgn);
+        wkCACFUpdateRectEnumeratorRelease(e);
 
         if (rects.isEmpty())
             break;
@@ -584,13 +566,13 @@ void WKCACFLayerRenderer::render(const Vector<CGRect>& dirtyRects)
         m_d3dDevice->Clear(rects.size(), rects.data(), D3DCLEAR_TARGET, 0, 1.0f, 0);
 
         m_d3dDevice->BeginScene();
-        CARenderOGLRender(m_renderer, u);
+        wkCACFContextRenderUpdate(m_context);
         m_d3dDevice->EndScene();
 
         err = m_d3dDevice->Present(0, 0, 0, 0);
 
         if (err == D3DERR_DEVICELOST) {
-            CARenderUpdateAddRect(u, &bounds);
+            wkCACFContextAddUpdateRect(m_context, bounds);
             if (!resetDevice(LostDevice)) {
                 // We can't reset the device right now. Try again soon.
                 renderSoon();
@@ -599,7 +581,7 @@ void WKCACFLayerRenderer::render(const Vector<CGRect>& dirtyRects)
         }
     } while (err == D3DERR_DEVICELOST);
 
-    CARenderUpdateFinish(u);
+    wkCACFContextFinishUpdate(m_context);
 
 #ifndef NDEBUG
     if (m_printTree)
@@ -641,7 +623,7 @@ void WKCACFLayerRenderer::initD3DGeometry()
 bool WKCACFLayerRenderer::resetDevice(ResetReason reason)
 {
     ASSERT(m_d3dDevice);
-    ASSERT(m_renderContext);
+    ASSERT(m_context);
 
     HRESULT hr = m_d3dDevice->TestCooperativeLevel();
 
@@ -660,10 +642,10 @@ bool WKCACFLayerRenderer::resetDevice(ResetReason reason)
 
     // We can reset the device.
 
-    // We have to purge the CARenderOGLContext whenever we reset the IDirect3DDevice9 in order to
+    // We have to release the context's D3D resrouces whenever we reset the IDirect3DDevice9 in order to
     // destroy any D3DPOOL_DEFAULT resources that Core Animation has allocated (e.g., textures used
     // for mask layers). See <http://msdn.microsoft.com/en-us/library/bb174425(v=VS.85).aspx>.
-    CARenderOGLPurge(m_renderer);
+    wkCACFContextReleaseD3DResources(m_context);
 
     D3DPRESENT_PARAMETERS parameters = initialPresentationParameters();
     hr = m_d3dDevice->Reset(&parameters);
index 2647c5f..fa890f5 100644 (file)
@@ -41,9 +41,7 @@
 #include <CoreGraphics/CGGeometry.h>
 
 interface IDirect3DDevice9;
-typedef struct _CACFContext* CACFContextRef;
-typedef struct _CARenderContext CARenderContext;
-typedef struct _CARenderOGLContext CARenderOGLContext;
+struct WKCACFContext;
 
 namespace WebCore {
 
@@ -64,7 +62,7 @@ public:
     ~WKCACFLayerRenderer();
 
     static bool acceleratedCompositingAvailable();
-    static void didFlushContext(CACFContextRef);
+    static void didFlushContext(WKCACFContext*);
 
     void setScrollFrame(const IntPoint&, const IntSize&);
     void setRootContents(CGImageRef);
@@ -108,9 +106,7 @@ private:
     RefPtr<WKCACFLayer> m_scrollLayer;
     RefPtr<WKCACFLayer> m_rootChildLayer;
     RefPtr<WKCACFLayer> m_clipLayer;
-    RetainPtr<CACFContextRef> m_context;
-    CARenderContext* m_renderContext;
-    CARenderOGLContext* m_renderer;
+    WKCACFContext* m_context;
     HWND m_hostWindow;
     Timer<WKCACFLayerRenderer> m_renderTimer;
     IntPoint m_scrollPosition;
index 0cd5a9e..4028826 100644 (file)
@@ -1,3 +1,17 @@
+2010-07-30  Adam Roben  <aroben@apple.com>
+
+        Add WKCACFContext and related functions
+
+        Also added some functions used by WKCAImageQueue.
+
+        Fixes <http://webkit.org/b/43244>.
+
+        Reviewed by Sam Weinig.
+
+        * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+        * win/lib/WebKitSystemInterface.lib:
+        * win/lib/WebKitSystemInterface_debug.lib:
+
 2010-07-27  Kinuko Yasuda  <kinuko@chromium.org>
 
         Reviewed by Ojan Vafai.
index 445b292..ae840ae 100644 (file)
 
 struct CGAffineTransform;
 struct CGPoint;
+struct CGRect;
 struct CGSize;
+struct IDirect3DDevice9;
+struct WKCACFContext;
+struct WKCACFUpdateRectEnumerator;
 
+typedef struct _CACFLayer* CACFLayerRef;
 typedef const struct __CFData* CFDataRef;
 typedef const struct __CFString* CFStringRef;
+typedef double CFTimeInterval;
 typedef struct CGColor* CGColorRef;
 typedef struct CGContext* CGContextRef;
 typedef unsigned short CGFontIndex;
 typedef struct CGFont* CGFontRef;
 typedef CGFontIndex CGGlyph;
 typedef wchar_t UChar;
+typedef struct _CFURLCredential* CFURLCredentialRef;
 typedef struct _CFURLResponse* CFURLResponseRef;
 typedef struct OpaqueCFHTTPCookieStorage*  CFHTTPCookieStorageRef;
 typedef struct _CFURLRequest* CFMutableURLRequestRef;
 typedef const struct _CFURLRequest* CFURLRequestRef;
-typedef struct _CFURLCredential* CFURLCredentialRef;
 typedef struct __CFHTTPMessage* CFHTTPMessageRef;
 typedef const struct __CFNumber* CFNumberRef;
 typedef struct __CFReadStream* CFReadStreamRef;
@@ -50,6 +56,12 @@ typedef const struct __CFURL* CFURLRef;
 typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
 typedef struct tagLOGFONTW LOGFONTW;
 typedef LOGFONTW LOGFONT;
+typedef struct _CACFLayer *CACFLayerRef;
+typedef struct __CVBuffer *CVBufferRef;
+typedef CVBufferRef CVImageBufferRef;
+typedef CVImageBufferRef CVPixelBufferRef;
+typedef struct _CAImageQueue *CAImageQueueRef;
+typedef unsigned long CFTypeID;
 
 void wkSetFontSmoothingLevel(int type);
 int wkGetFontSmoothingLevel();
@@ -89,4 +101,57 @@ CFURLCredentialRef wkCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceR
 
 CFStringRef wkCFNetworkErrorGetLocalizedDescription(CFIndex errorCode);
 
+
+enum wkCAImageQueueFlags {
+    kWKCAImageQueueAsync = 1U << 0,
+    kWKCAImageQueueFill = 1U << 1,
+    kWKCAImageQueueProtected = 1U << 2,
+    kWKCAImageQueueUseCleanAperture = 1U << 3,
+    kWKCAImageQueueUseAspectRatio = 1U << 4,
+    kWKCAImageQueueLowQualityColor = 1U << 5,
+};
+
+enum wkWKCAImageQueueImageType {
+    kWKCAImageQueueNil = 1,
+    kWKCAImageQueueSurface,
+    kWKCAImageQueueBuffer,
+    kWKCAImageQueueIOSurface,
+};
+
+enum wkWKCAImageQueueImageFlags {
+    kWKCAImageQueueOpaque = 1U << 0,
+    kWKCAImageQueueFlush = 1U << 1,
+    kWKCAImageQueueWillFlush = 1U << 2,
+    kWKCAImageQueueFlipped = 1U << 3,
+    kWKCAImageQueueWaitGPU = 1U << 4,
+};
+
+typedef void (*wkCAImageQueueReleaseCallback)(unsigned int type, uint64_t id, void *info);
+CAImageQueueRef wkCAImageQueueCreate(uint32_t width, uint32_t height, uint32_t capacity);
+void wkCAImageQueueInvalidate(CAImageQueueRef iq);
+size_t wkCAImageQueueCollect(CAImageQueueRef iq);
+bool wkCAImageQueueInsertImage(CAImageQueueRef iq, CFTimeInterval t, unsigned int type, uint64_t id, uint32_t flags, wkCAImageQueueReleaseCallback release, void *info);
+uint64_t wkCAImageQueueRegisterPixelBuffer(CAImageQueueRef iq, void *data, size_t data_size, size_t rowbytes, size_t width, size_t height, OSType pixel_format, CFDictionaryRef attachments, uint32_t flags);
+void wkCAImageQueueSetFlags(CAImageQueueRef iq, uint32_t mask, uint32_t flags);
+uint32_t wkCAImageQueueGetFlags(CAImageQueueRef iq);
+CFTypeID wkCAImageQueueGetTypeID(void);
+
+WKCACFContext* wkCACFContextCreate();
+void wkCACFContextDestroy(WKCACFContext*);
+
+void wkCACFContextSetLayer(WKCACFContext*, CACFLayerRef);
+void wkCACFContextFlush(WKCACFContext*);
+
+void wkCACFContextInitializeD3DDevice(WKCACFContext*, IDirect3DDevice9*);
+void wkCACFContextReleaseD3DResources(WKCACFContext*);
+
+bool wkCACFContextBeginUpdate(WKCACFContext*, void* buffer, size_t bufferSize, CFTimeInterval time, const CGRect& bounds, const CGRect dirtyRects[], size_t dirtyRectCount);
+void wkCACFContextRenderUpdate(WKCACFContext*);
+void wkCACFContextFinishUpdate(WKCACFContext*);
+void wkCACFContextAddUpdateRect(WKCACFContext*, const CGRect&);
+
+WKCACFUpdateRectEnumerator* wkCACFContextCopyUpdateRectEnumerator(WKCACFContext*);
+const CGRect* wkCACFUpdateRectEnumeratorNextRect(WKCACFUpdateRectEnumerator*);
+void wkCACFUpdateRectEnumeratorRelease(WKCACFUpdateRectEnumerator*);
+
 #endif // WebKitSystemInterface_h
index 4fcc36b..d1eafbf 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface.lib differ
index 6d836db..b98ced6 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib differ