-
aroben@apple.com authored
This will be needed to handle cases where the client might release its reference to us while we're calling out to it. WKCACFLayerRenderer now has a setClient function, which is used rather than passing the client to create(). This allows clients to null out the client pointer when they're done with the renderer. Fixes <http://webkit.org/b/52749> WKCACFLayerRenderer should be ref-counted Reviewed by Simon Fraser. Source/WebCore: * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: (WebCore::MediaPlayerPrivateFullscreenWindow::MediaPlayerPrivateFullscreenWindow): * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Updated for WKCACFLayerRenderer changes. * platform/graphics/win/WKCACFLayerRenderer.cpp: (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable): Updated for changes to create(). (WebCore::WKCACFLayerRenderer::create): No longer takes a WKCACFLayerRendererClient. Now returns a PassOwnPtr. (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): No longer takes a WKCACFLayerRendererClient. * platform/graphics/win/WKCACFLayerRenderer.h: Made WKCACFLayerRenderer inherit from RefCounted. (WebCore::WKCACFLayerRenderer::setClient): Added this simple setter. Source/WebKit/win: Update for WKCACFLayerRenderer changes * WebView.cpp: (WebView::~WebView): Added some assertions to make sure we've gotten rid of our compositing-related members. My biggest concern was making sure that m_layerRenderer was gone, which would also mean we had nulled out its client pointer. (WebView::setAcceleratedCompositing): Changed to call WKCACFLayerRenderer::setClient instead of passing the client into create(), and to clear out the client before nulling out m_layerRenderer. * WebView.h: Changed m_layerRenderer from an OwnPtr to a RefPtr. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a60ce714