[chromium] Plumb a compositor surface ready notification through to the threaded...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2012 23:49:41 +0000 (23:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2012 23:49:41 +0000 (23:49 +0000)
commit69a428dd62c0f7ce3f7c477d78bb9b2e8736511a
tree54dce2f810a2bab7dc66f651b778fba94ce8529a
parent82d68d42546013d4f01ffc3339ddb83ee3381fe3
[chromium] Plumb a compositor surface ready notification through to the threaded compositor
https://bugs.webkit.org/show_bug.cgi?id=84305

Patch by James Robinson <jamesr@chromium.org> on 2012-04-20
Reviewed by Adrienne Walker.

Source/Platform:

Add a notification for when the compositor surface associated with a given view is ready to use.

* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):

Source/WebCore:

Plumb setSurfaceReady through to the scheduler.

* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::setSurfaceReady):
(WebCore):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHost):
* platform/graphics/chromium/cc/CCProxy.h:
(CCProxy):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::setSurfaceReady):
(WebCore):
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
(CCSingleThreadProxy):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::setSurfaceReady):
(WebCore):
(WebCore::CCThreadProxy::setSurfaceReadyOnImplThread):
(WebCore::CCThreadProxy::initializeImplOnImplThread):
* platform/graphics/chromium/cc/CCThreadProxy.h:
(CCThreadProxy):

Source/WebKit/chromium:

Adds a notification to WebWidget for when the compositor surface is ready to use. This exists to fix a race
condition when WebKit requires that we enter compositing mode but we haven't completed initialization of the
native window/etc backing the WebWidget, and we can't block for this initialization to complete without inducing
deadlocks. In this situation, we proceed as usual except that we can't attempt to use the compositor context or
it will fail.

* public/WebWidget.h:
(WebWidget):
* src/WebLayerTreeView.cpp:
(WebKit::WebLayerTreeView::setSurfaceReady):
(WebKit):
* src/WebPagePopupImpl.cpp:
(WebKit::WebPagePopupImpl::setCompositorSurfaceReady):
(WebKit):
* src/WebPagePopupImpl.h:
(WebPagePopupImpl):
* src/WebPopupMenuImpl.cpp:
(WebKit::WebPopupMenuImpl::setCompositorSurfaceReady):
(WebKit):
* src/WebPopupMenuImpl.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setCompositorSurfaceReady):
(WebKit):
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
* src/WebViewImpl.h:
(WebViewImpl):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@114800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/Platform/ChangeLog
Source/Platform/chromium/public/WebLayerTreeView.h
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
Source/WebCore/platform/graphics/chromium/cc/CCProxy.h
Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp
Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h
Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp
Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebWidget.h
Source/WebKit/chromium/src/WebLayerTreeView.cpp
Source/WebKit/chromium/src/WebPagePopupImpl.cpp
Source/WebKit/chromium/src/WebPagePopupImpl.h
Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
Source/WebKit/chromium/src/WebPopupMenuImpl.h
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h
Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp