Remove uses of CACFContextRef and CARender* from WebCore
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Oct 2010 06:36:00 +0000 (06:36 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Oct 2010 06:36:00 +0000 (06:36 +0000)
commitb6052cf0fc23b3fd1fb44849ce79a7f29f0006d5
treeebbe4d14e87ba55a96dc75903edd563c1db34141
parent9da7be3494ea669260f7b83b22288175c5cfcc92
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

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70129 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/lib/WebKitSystemInterface.lib
WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib