Coordinated Graphics : Refactor CoordinatedSurface to manage the lifecycle of Graphic...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jun 2013 09:43:20 +0000 (09:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jun 2013 09:43:20 +0000 (09:43 +0000)
commit25b1378c238009398a570fa440f4980b2305e3cc
tree1986e7d68387e483e67511b7db214fe483e7679b
parent5588bd47bec8321fc56228ca7f93999e62539060
Coordinated Graphics : Refactor CoordinatedSurface to manage the lifecycle of GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=108899

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-06-06
Reviewed by Noam Rosenthal.

This is a preparation patch for Threaded Coordinated Graphics.

This patch changes CoordinatedSurface to be responsible for the
lifecycle of GraphicsContext used in Coordinated Graphics System.
CoordinatedImageBacking and UpdateAtlas do not ask for the ownership
of GraphicsContext anymore. Instead, those classes use client pattern to
ask the CoordiantedSurface to paint to the GraphicsContext.

This refactoring is needed to implement CoordinatedSurface for Threaded
Coordinated Graphics.

Source/WebCore:

No new tests, covered by existing tests.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::paintToSurface):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::ImageBackingSurfaceClient::ImageBackingSurfaceClient):
(WebCore::CoordinatedImageBacking::update):
* platform/graphics/texmap/coordinated/CoordinatedSurface.h:
(WebCore::CoordinatedSurface::Client::~Client):
* platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
(WebCore::CoordinatedTile::updateBackBuffer):
(WebCore::CoordinatedTile::paintToSurfaceContext):
* platform/graphics/texmap/coordinated/CoordinatedTile.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlasSurfaceClient::UpdateAtlasSurfaceClient):
(WebCore::UpdateAtlas::paintOnAvailableBuffer):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:

Source/WebKit2:

* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
(WebKit::WebCoordinatedSurface::paintToSurface):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::paintToSurface):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.h
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedTile.cpp
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedTile.h
Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.cpp
Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp
Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h