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)
commit5546aa435a4aa84cc6e644ff03d488a6d4fd85bf
treec01c96ddad4d17c06550789de32f73276dbe03a0
parentf2c99626faabacb303852a76ba2e39dc3b314d19
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.

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