Skip to content
  • nduca@chromium.org's avatar
    [chromium] Expose CCGraphicsContext as WebCompositorOutputSurface · 90ebc0fd
    nduca@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=92890
    
    Reviewed by James Robinson.
    
    Source/Platform:
    
    The CCGraphicsContext was introduced as a wrapper around the 2D
    and 3D output for the compositor. However, it is a CC only
    concept. We want to be able to make 2D and ubercomp-mode IPCs on
    behalf of the compositor. This patch allows this by pushing this
    abstraction out to the Chrome-visible layer of the compositor,
    changing the name to OutputSurface based on discussions on
    wkb.ug/90736. A future patch will rename the CCGraphicsContext to
    CCOutputSurface.
    
    * Platform.gypi:
    * chromium/public/WebCompositorOutputSurface.h: Added.
    (WebKit):
    (WebCompositorOutputSurface):
    (WebKit::WebCompositorOutputSurface::~WebCompositorOutputSurface):
    (WebKit::WebCompositorOutputSurface::Capabilities::Capabilities):
    (Capabilities):
    * chromium/public/WebCompositorOutputSurfaceClient.h: Added.
    (WebKit):
    (WebCompositorOutputSurfaceClient):
    (WebKit::WebCompositorOutputSurfaceClient::~WebCompositorOutputSurfaceClient):
    * chromium/public/WebLayerTreeView.h:
    (WebKit::WebLayerTreeView::Settings::Settings):
    (Settings):
    * chromium/public/WebLayerTreeViewClient.h:
    (WebKit):
    (WebLayerTreeViewClient):
    (WebKit::WebLayerTreeViewClient::createContext3D):
    (WebKit::WebLayerTreeViewClient::createOutputSurface):
    
    Source/WebCore:
    
    * platform/graphics/chromium/cc/CCGraphicsContext.h:
    (WebCore):
    * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
    (WebCore::CCLayerTreeHost::initializeLayerRenderer):
    (WebCore::CCLayerTreeHost::recreateContext):
    (WebCore::CCLayerTreeHost::createContext):
    * platform/graphics/chromium/cc/CCLayerTreeHost.h:
    (WebCore):
    (CCLayerTreeHostClient):
    (WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
    (CCLayerTreeSettings):
    * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
    (WebCore::CCLayerTreeHostImpl::onVSyncParametersChanged):
    (WebCore):
    (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
    * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
    (CCLayerTreeHostImplClient):
    * platform/graphics/chromium/cc/CCProxy.h:
    (WebKit):
    (WebCore):
    * platform/graphics/chromium/cc/CCRenderer.h:
    (CCRendererClient):
    (WebCore::CCRendererClient::~CCRendererClient):
    * platform/graphics/chromium/cc/CCResourceProvider.cpp:
    * platform/graphics/chromium/cc/CCResourceProvider.h:
    * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
    * platform/graphics/chromium/cc/CCThreadProxy.cpp:
    (WebCore::CCThreadProxy::recreateContext):
    (WebCore::CCThreadProxy::onVSyncParametersChanged):
    (WebCore):
    (WebCore::CCThreadProxy::beginFrame):
    * platform/graphics/chromium/cc/CCThreadProxy.h:
    
    Source/WebKit/chromium:
    
    * WebKit.gyp:
    * WebKit.gypi:
    * public/WebSettings.h:
    * public/WebViewClient.h:
    (WebKit):
    (WebViewClient):
    (WebKit::WebViewClient::createOutputSurface):
    * src/WebLayerTreeView.cpp:
    (WebKit::WebLayerTreeView::Settings::operator CCLayerTreeSettings):
    * src/WebLayerTreeViewImpl.cpp:
    (WebKit):
    (WebGraphicsContextToOutputSurfaceAdapter):
    (WebKit::WebGraphicsContextToOutputSurfaceAdapter::WebGraphicsContextToOutputSurfaceAdapter):
    (WebKit::WebLayerTreeViewClientAdapter::WebLayerTreeViewClientAdapter):
    * src/WebSettingsImpl.cpp:
    (WebKit::WebSettingsImpl::WebSettingsImpl):
    * src/WebSettingsImpl.h:
    (WebSettingsImpl):
    * src/WebViewImpl.cpp:
    (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
    (WebKit::WebViewImpl::createOutputSurface):
    (WebKit):
    (WebKit::WebViewImpl::didRebindGraphicsContext):
    (WebKit::WebViewImpl::didRecreateOutputSurface):
    * src/WebViewImpl.h:
    (WebViewImpl):
    * tests/CCLayerTreeHostImplTest.cpp:
    * tests/CCLayerTreeHostTest.cpp:
    (WTF):
    (WTF::CCLayerTreeHostTestSetSingleLostContext::didRecreateOutputSurface):
    (WTF::CCLayerTreeHostTestSetRepeatedLostContext::didRecreateOutputSurface):
    * tests/CCResourceProviderTest.cpp:
    (WebKit::CCResourceProviderTest::CCResourceProviderTest):
    * tests/CCTextureUpdateControllerTest.cpp:
    * tests/CCThreadedTest.cpp:
    (WebKitTests::TestHooks::createOutputSurface):
    * tests/CCThreadedTest.h:
    (WebKitTests::TestHooks::didRecreateOutputSurface):
    * tests/Canvas2DLayerBridgeTest.cpp:
    (Canvas2DLayerBridgeTest::fullLifecycleTest):
    * tests/FakeCCGraphicsContext.h:
    (WebKit::createFakeCCGraphicsContext):
    * tests/FakeCCLayerTreeHostClient.h:
    * tests/FakeWebCompositorOutputSurface.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCGraphicsContext.h.
    (WebKit):
    (FakeWebCompositorOutputSurface):
    (WebKit::FakeWebCompositorOutputSurface::create):
    (WebKit::FakeWebCompositorOutputSurface::FakeWebCompositorOutputSurface):
    * tests/LayerRendererChromiumTest.cpp:
    (LayerRendererChromiumTest::LayerRendererChromiumTest):
    (TEST):
    * tests/WebLayerTest.cpp:
    * tests/WebLayerTreeViewTest.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    90ebc0fd