Coordinated Graphics: Add CoordinatedSurface to remove the dependency of ShareableSur...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2012 08:28:29 +0000 (08:28 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2012 08:28:29 +0000 (08:28 +0000)
commite89893b165a52da39e56393f0216c9c89bc1f061
tree8edf6edd3c9f9d117c8560ab9395fb27f4b20121
parentb7f8cfc3024a1b754a2b4de8a98ebbd3aefb6443
Coordinated Graphics: Add CoordinatedSurface to remove the dependency of ShareableSurface from Coordinated Graphics.
https://bugs.webkit.org/show_bug.cgi?id=100819

Patch by Huang Dongsung <luxtella@company100.net> on 2012-12-10
Reviewed by Noam Rosenthal.

Internal Review by Gwang Yoon Hwang and Jae Hyun Park.

It is a preparation patch for Threaded Coordinated Graphics on WK1.

Create a CoordinatedSurface class that can be the base class both for
the current IPC-based ShareableSurface, renamed here to
WebCoordinatedSurface, and to a future thread-based surface
implementation.

* CMakeLists.txt:
* Shared/CoordinatedGraphics/CoordinatedSurface.h: Added.
(WebCore):
(WebKit):
(CoordinatedSurface):
(WebKit::CoordinatedSurface::~CoordinatedSurface):
(WebKit::CoordinatedSurface::supportsAlpha):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: Renamed from Source/WebKit2/Shared/ShareableSurface.cpp.
  Extends CoordinatedSurface.
(WebKit):
(WebKit::WebCoordinatedSurface::Handle::Handle):
(WebKit::WebCoordinatedSurface::Handle::encode):
(WebKit::WebCoordinatedSurface::Handle::decode):
(WebKit::CoordinatedSurface::create):
(WebKit::WebCoordinatedSurface::create):
(WebKit::WebCoordinatedSurface::createWithSurface):
(WebKit::WebCoordinatedSurface::createGraphicsContext):
(WebKit::WebCoordinatedSurface::WebCoordinatedSurface):
(WebKit::WebCoordinatedSurface::~WebCoordinatedSurface):
(WebKit::WebCoordinatedSurface::createHandle):
(WebKit::WebCoordinatedSurface::copyToTexture):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.h: Renamed from Source/WebKit2/Shared/ShareableSurface.h.
(WebCore):
(WebKit):
(WebCoordinatedSurface):
(Handle):
(WebKit::WebCoordinatedSurface::Handle::graphicsSurfaceToken):
(WebKit::WebCoordinatedSurface::isBackedByGraphicsSurface):
* Target.pri:
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
(WebKit::CoordinatedBackingStoreTile::swapBuffers):
(WebKit::CoordinatedBackingStoreTile::setBackBuffer):
(WebKit::CoordinatedBackingStore::updateTile):
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
(WebKit):
(CoordinatedBackingStoreTile):
(CoordinatedBackingStore):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::createUpdateAtlas):
(WebKit::LayerTreeCoordinatorProxy::updateImageBacking):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::updateImageBacking):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(TileUpdate):
(WebKit::LayerTreeRenderer::TileUpdate::TileUpdate):
(LayerTreeRenderer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp:
(WebKit::CoordinatedImageBacking::update):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h:
(Coordinator):
(CoordinatedImageBacking):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::updateImageBacking):
(WebKit::LayerTreeCoordinator::createUpdateAtlas):
(WebKit::LayerTreeCoordinator::beginContentUpdate):
(WebKit::LayerTreeCoordinator::releaseInactiveAtlasesTimerFired):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:
(UpdateAtlasClient):
(UpdateAtlas):
(WebKit::UpdateAtlas::supportsAlpha):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedSurface.h [new file with mode: 0644]
Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp [moved from Source/WebKit2/Shared/ShareableSurface.cpp with 61% similarity]
Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h [moved from Source/WebKit2/Shared/ShareableSurface.h with 50% similarity]
Source/WebKit2/Target.pri
Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h