Title: [135207] trunk/Source/WebKit2
Revision
135207
Author
[email protected]
Date
2012-11-19 16:03:51 -0800 (Mon, 19 Nov 2012)

Log Message

Coordinated Graphics: Remove a texture if an direct composited image is off the viewport.
https://bugs.webkit.org/show_bug.cgi?id=102449

Patch by Huang Dongsung <[email protected]> on 2012-11-19
Reviewed by Noam Rosenthal.

Currently, once uploading textures for composited images, Coordinated Graphics
does not release the textures until all layers using images are destroyed.

This patch removes a texture if we don't need to render an image. This mechanism
is similar how TiledBackingStore removes invisible tiles.

When all layers are invisible, we wait 3 seconds to remove the content
of the image, because we want to prevent a transform animation from
creating and destroying a texture over and over again.

* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
(WebKit::CoordinatedBackingStore::removeAllTiles):
(WebKit):
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
(CoordinatedBackingStore):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::clearImageBackingContents):
(WebKit):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::clearImageBackingContents):
(WebKit):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncImageBacking):
(WebCore::CoordinatedGraphicsLayer::imageBackingVisible):
(WebCore):
(WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp:
(WebKit::CoordinatedImageBacking::CoordinatedImageBacking):
(WebKit::CoordinatedImageBacking::addHost):
(WebKit::CoordinatedImageBacking::removeHost):
(WebKit::CoordinatedImageBacking::update):
(WebKit):
(WebKit::CoordinatedImageBacking::updateVisibilityIfNeeded):
(WebKit::CoordinatedImageBacking::clearContentsTimerFired):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h:
(Coordinator):
(Host):
(CoordinatedImageBacking):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::clearImageBackingContents):
(WebKit):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (135206 => 135207)


--- trunk/Source/WebKit2/ChangeLog	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/ChangeLog	2012-11-20 00:03:51 UTC (rev 135207)
@@ -1,3 +1,61 @@
+2012-11-19  Huang Dongsung  <[email protected]>
+
+        Coordinated Graphics: Remove a texture if an direct composited image is off the viewport.
+        https://bugs.webkit.org/show_bug.cgi?id=102449
+
+        Reviewed by Noam Rosenthal.
+
+        Currently, once uploading textures for composited images, Coordinated Graphics
+        does not release the textures until all layers using images are destroyed.
+
+        This patch removes a texture if we don't need to render an image. This mechanism
+        is similar how TiledBackingStore removes invisible tiles.
+
+        When all layers are invisible, we wait 3 seconds to remove the content
+        of the image, because we want to prevent a transform animation from
+        creating and destroying a texture over and over again.
+
+        * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
+        (WebKit::CoordinatedBackingStore::removeAllTiles):
+        (WebKit):
+        * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
+        (CoordinatedBackingStore):
+        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
+        (WebKit::LayerTreeCoordinatorProxy::clearImageBackingContents):
+        (WebKit):
+        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
+        (LayerTreeCoordinatorProxy):
+        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
+        (WebKit::LayerTreeRenderer::clearImageBackingContents):
+        (WebKit):
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
+        (LayerTreeRenderer):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
+        (WebCore::CoordinatedGraphicsLayer::imageBackingVisible):
+        (WebCore):
+        (WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
+        (CoordinatedGraphicsLayer):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp:
+        (WebKit::CoordinatedImageBacking::CoordinatedImageBacking):
+        (WebKit::CoordinatedImageBacking::addHost):
+        (WebKit::CoordinatedImageBacking::removeHost):
+        (WebKit::CoordinatedImageBacking::update):
+        (WebKit):
+        (WebKit::CoordinatedImageBacking::updateVisibilityIfNeeded):
+        (WebKit::CoordinatedImageBacking::clearContentsTimerFired):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h:
+        (Coordinator):
+        (Host):
+        (CoordinatedImageBacking):
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
+        (WebKit::LayerTreeCoordinator::clearImageBackingContents):
+        (WebKit):
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
+        (LayerTreeCoordinator):
+
 2012-11-19  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r135201.

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp (135206 => 135207)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp	2012-11-20 00:03:51 UTC (rev 135207)
@@ -77,6 +77,13 @@
     m_tilesToRemove.add(id);
 }
 
+void CoordinatedBackingStore::removeAllTiles()
+{
+    HashMap<int, CoordinatedBackingStoreTile>::iterator end = m_tiles.end();
+    for (HashMap<int, CoordinatedBackingStoreTile>::iterator it = m_tiles.begin(); it != end; ++it)
+        m_tilesToRemove.add(it->key);
+}
+
 void CoordinatedBackingStore::updateTile(int id, const IntRect& sourceRect, const IntRect& tileRect, PassRefPtr<ShareableSurface> backBuffer, const IntPoint& offset)
 {
     HashMap<int, CoordinatedBackingStoreTile>::iterator it = m_tiles.find(id);

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h (135206 => 135207)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h	2012-11-20 00:03:51 UTC (rev 135207)
@@ -59,6 +59,7 @@
 public:
     void createTile(int, float);
     void removeTile(int);
+    void removeAllTiles();
     void updateTile(int, const WebCore::IntRect&, const WebCore::IntRect&, PassRefPtr<ShareableSurface>, const WebCore::IntPoint&);
     bool isEmpty() const;
     static PassRefPtr<CoordinatedBackingStore> create() { return adoptRef(new CoordinatedBackingStore); }

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp (135206 => 135207)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp	2012-11-20 00:03:51 UTC (rev 135207)
@@ -153,6 +153,11 @@
     dispatchUpdate(bind(&LayerTreeRenderer::updateImageBacking, m_renderer.get(), imageID, ShareableSurface::create(handle)));
 }
 
+void LayerTreeCoordinatorProxy::clearImageBackingContents(CoordinatedImageBackingID imageID)
+{
+    dispatchUpdate(bind(&LayerTreeRenderer::clearImageBackingContents, m_renderer.get(), imageID));
+}
+
 void LayerTreeCoordinatorProxy::removeImageBacking(CoordinatedImageBackingID imageID)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::removeImageBacking, m_renderer.get(), imageID));

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h (135206 => 135207)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h	2012-11-20 00:03:51 UTC (rev 135207)
@@ -73,6 +73,7 @@
     void removeUpdateAtlas(int atlasID);
     void createImageBacking(CoordinatedImageBackingID);
     void updateImageBacking(CoordinatedImageBackingID, const ShareableSurface::Handle&);
+    void clearImageBackingContents(CoordinatedImageBackingID);
     void removeImageBacking(CoordinatedImageBackingID);
     void didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&);
     void updateViewport();

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in (135206 => 135207)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in	2012-11-20 00:03:51 UTC (rev 135207)
@@ -37,6 +37,7 @@
     RemoveUpdateAtlas(int atlasID)
     CreateImageBacking(uint64_t imageID)
     UpdateImageBacking(uint64_t imageID, WebKit::ShareableSurface::Handle handle)
+    ClearImageBackingContents(uint64_t imageID)
     RemoveImageBacking(uint64_t imageID)
     DidRenderFrame(WebCore::IntSize contentsSize, WebCore::IntRect coveredRect)
     DidChangeScrollPosition(WebCore::IntPoint position)

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp (135206 => 135207)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp	2012-11-20 00:03:51 UTC (rev 135207)
@@ -511,6 +511,15 @@
     m_backingStoresWithPendingBuffers.add(backingStore);
 }
 
+void LayerTreeRenderer::clearImageBackingContents(CoordinatedImageBackingID imageID)
+{
+    ASSERT(m_imageBackings.contains(imageID));
+    ImageBackingMap::iterator it = m_imageBackings.find(imageID);
+    RefPtr<CoordinatedBackingStore> backingStore = it->value;
+    backingStore->removeAllTiles();
+    m_backingStoresWithPendingBuffers.add(backingStore);
+}
+
 void LayerTreeRenderer::removeImageBacking(CoordinatedImageBackingID imageID)
 {
     ASSERT(m_imageBackings.contains(imageID));

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h (135206 => 135207)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h	2012-11-20 00:03:51 UTC (rev 135207)
@@ -103,6 +103,7 @@
     void flushLayerChanges();
     void createImageBacking(CoordinatedImageBackingID);
     void updateImageBacking(CoordinatedImageBackingID, PassRefPtr<ShareableSurface>);
+    void clearImageBackingContents(CoordinatedImageBackingID);
     void removeImageBacking(CoordinatedImageBackingID);
     void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&);
     void setAnimationsLocked(bool);

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp (135206 => 135207)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp	2012-11-20 00:03:51 UTC (rev 135207)
@@ -504,7 +504,7 @@
 
         if (!m_coordinatedImageBacking) {
             m_coordinatedImageBacking = m_coordinator->createImageBackingIfNeeded(m_compositedImage.get());
-            m_coordinatedImageBacking->addLayerClient(this);
+            m_coordinatedImageBacking->addHost(this);
             m_layerInfo.imageID = m_coordinatedImageBacking->id();
         }
 
@@ -603,13 +603,19 @@
     syncCanvas();
 }
 
+bool CoordinatedGraphicsLayer::imageBackingVisible()
+{
+    ASSERT(m_coordinatedImageBacking);
+    return tiledBackingStoreVisibleRect().intersects(contentsRect());
+}
+
 void CoordinatedGraphicsLayer::releaseImageBackingIfNeeded()
 {
     if (!m_coordinatedImageBacking)
         return;
 
     ASSERT(m_coordinator);
-    m_coordinatedImageBacking->removeLayerClient(this);
+    m_coordinatedImageBacking->removeHost(this);
     m_coordinatedImageBacking.clear();
     m_layerInfo.imageID = InvalidCoordinatedImageBackingID;
 }

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h (135206 => 135207)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h	2012-11-20 00:03:51 UTC (rev 135207)
@@ -83,6 +83,7 @@
 
 class CoordinatedGraphicsLayer : public GraphicsLayer
     , public TiledBackingStoreClient
+    , public WebKit::CoordinatedImageBacking::Host
     , public WebKit::CoordinatedTileClient {
 public:
     explicit CoordinatedGraphicsLayer(GraphicsLayerClient*);
@@ -189,6 +190,9 @@
     void createBackingStore();
     void releaseImageBackingIfNeeded();
 
+    // CoordinatedImageBacking::Host
+    virtual bool imageBackingVisible() OVERRIDE;
+
     void destroyCanvasIfNeeded();
     void createCanvasIfNeeded();
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp (135206 => 135207)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp	2012-11-20 00:03:51 UTC (rev 135207)
@@ -49,7 +49,9 @@
     : m_coordinator(client)
     , m_image(image)
     , m_id(getCoordinatedImageBackingID(m_image.get()))
+    , m_clearContentsTimer(this, &CoordinatedImageBacking::clearContentsTimerFired)
     , m_isDirty(false)
+    , m_isVisible(false)
 {
     // FIXME: We would need to decode a small image directly into a GraphicsSurface.
     // http://webkit.org/b/101426
@@ -61,19 +63,19 @@
 {
 }
 
-void CoordinatedImageBacking::addLayerClient(CoordinatedGraphicsLayer* layerClient)
+void CoordinatedImageBacking::addHost(Host* host)
 {
-    ASSERT(!m_layerClients.contains(layerClient));
-    m_layerClients.append(layerClient);
+    ASSERT(!m_hosts.contains(host));
+    m_hosts.append(host);
 }
 
-void CoordinatedImageBacking::removeLayerClient(CoordinatedGraphicsLayer* layerClient)
+void CoordinatedImageBacking::removeHost(Host* host)
 {
-    size_t position = m_layerClients.find(layerClient);
+    size_t position = m_hosts.find(host);
     ASSERT(position != notFound);
-    m_layerClients.remove(position);
+    m_hosts.remove(position);
 
-    if (m_layerClients.isEmpty())
+    if (m_hosts.isEmpty())
         m_coordinator->removeImageBacking(id());
 }
 
@@ -86,9 +88,21 @@
 {
     releaseSurfaceIfNeeded();
 
-    if (!m_isDirty)
+    bool changedToVisible;
+    updateVisibilityIfNeeded(changedToVisible);
+    if (!m_isVisible)
         return;
 
+    if (!changedToVisible) {
+        if (!m_isDirty)
+            return;
+
+        if (m_nativeImagePtr == m_image->nativeImageForCurrentFrame()) {
+            m_isDirty = false;
+            return;
+        }
+    }
+
     m_surface = ShareableSurface::create(m_image->size(), m_image->currentFrameHasAlpha() ? ShareableBitmap::SupportsAlpha : ShareableBitmap::NoFlags, ShareableSurface::SupportsGraphicsSurface);
     m_handle = adoptPtr(new ShareableSurface::Handle());
 
@@ -102,6 +116,8 @@
     OwnPtr<GraphicsContext> context = m_surface->createGraphicsContext(rect);
     context->drawImage(m_image.get(), ColorSpaceDeviceRGB, rect, rect);
 
+    m_nativeImagePtr = m_image->nativeImageForCurrentFrame();
+
     m_coordinator->updateImageBacking(id(), *m_handle);
     m_isDirty = false;
 }
@@ -114,5 +130,39 @@
     m_surface.clear();
 }
 
+static const double clearContentsTimerInterval = 3;
+
+void CoordinatedImageBacking::updateVisibilityIfNeeded(bool& changedToVisible)
+{
+    bool previousIsVisible = m_isVisible;
+
+    m_isVisible = false;
+    for (size_t i = 0; i < m_hosts.size(); ++i) {
+        if (m_hosts[i]->imageBackingVisible()) {
+            m_isVisible = true;
+            break;
+        }
+    }
+
+    bool changedToInvisible = previousIsVisible && !m_isVisible;
+    if (changedToInvisible) {
+        ASSERT(!m_clearContentsTimer.isActive());
+        m_clearContentsTimer.startOneShot(clearContentsTimerInterval);
+    }
+
+    changedToVisible = !previousIsVisible && m_isVisible;
+
+    if (m_isVisible && m_clearContentsTimer.isActive()) {
+        m_clearContentsTimer.stop();
+        // We don't want to update the texture if we didn't remove the texture.
+        changedToVisible = false;
+    }
 }
+
+void CoordinatedImageBacking::clearContentsTimerFired(WebCore::Timer<CoordinatedImageBacking>*)
+{
+    m_coordinator->clearImageBackingContents(id());
+}
+
+}
 #endif

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h (135206 => 135207)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h	2012-11-20 00:03:51 UTC (rev 135207)
@@ -35,10 +35,6 @@
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
 
-namespace WebCore {
-class CoordinatedGraphicsLayer;
-}
-
 namespace WebKit {
 
 class CoordinatedImageBacking : public RefCounted<CoordinatedImageBacking> {
@@ -47,17 +43,23 @@
     public:
         virtual void createImageBacking(CoordinatedImageBackingID) = 0;
         virtual void updateImageBacking(CoordinatedImageBackingID, const ShareableSurface::Handle&) = 0;
+        virtual void clearImageBackingContents(CoordinatedImageBackingID) = 0;
         virtual void removeImageBacking(CoordinatedImageBackingID) = 0;
     };
 
+    class Host {
+    public:
+        virtual bool imageBackingVisible() = 0;
+    };
+
     static PassRefPtr<CoordinatedImageBacking> create(Coordinator*, PassRefPtr<WebCore::Image>);
     virtual ~CoordinatedImageBacking();
 
     static CoordinatedImageBackingID getCoordinatedImageBackingID(WebCore::Image*);
     CoordinatedImageBackingID id() const { return m_id; }
 
-    void addLayerClient(WebCore::CoordinatedGraphicsLayer*);
-    void removeLayerClient(WebCore::CoordinatedGraphicsLayer*);
+    void addHost(Host*);
+    void removeHost(Host*);
 
     // When a new image is updated or an animated gif is progressed, CoordinatedGraphicsLayer calls markDirty().
     void markDirty();
@@ -69,16 +71,23 @@
     CoordinatedImageBacking(Coordinator*, PassRefPtr<WebCore::Image>);
 
     void releaseSurfaceIfNeeded();
+    void updateVisibilityIfNeeded(bool& changedToVisible);
+    void clearContentsTimerFired(WebCore::Timer<CoordinatedImageBacking>*);
 
     Coordinator* m_coordinator;
     RefPtr<WebCore::Image> m_image;
+    WebCore::NativeImagePtr m_nativeImagePtr;
     CoordinatedImageBackingID m_id;
-    Vector<WebCore::CoordinatedGraphicsLayer*> m_layerClients;
+    Vector<Host*> m_hosts;
 
     RefPtr<ShareableSurface> m_surface;
     OwnPtr<ShareableSurface::Handle> m_handle;
 
+    WebCore::Timer<CoordinatedImageBacking> m_clearContentsTimer;
+
     bool m_isDirty;
+    bool m_isVisible;
+
 };
 
 }

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp (135206 => 135207)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp	2012-11-20 00:03:51 UTC (rev 135207)
@@ -576,6 +576,12 @@
     m_webPage->send(Messages::LayerTreeCoordinatorProxy::UpdateImageBacking(imageID, handle));
 }
 
+void LayerTreeCoordinator::clearImageBackingContents(CoordinatedImageBackingID imageID)
+{
+    m_shouldSyncFrame = true;
+    m_webPage->send(Messages::LayerTreeCoordinatorProxy::ClearImageBackingContents(imageID));
+}
+
 void LayerTreeCoordinator::removeImageBacking(CoordinatedImageBackingID imageID)
 {
     if (m_isPurging)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h (135206 => 135207)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h	2012-11-19 23:47:19 UTC (rev 135206)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h	2012-11-20 00:03:51 UTC (rev 135207)
@@ -126,6 +126,7 @@
     // CoordinatedImageBacking::Coordinator
     virtual void createImageBacking(CoordinatedImageBackingID) OVERRIDE;
     virtual void updateImageBacking(CoordinatedImageBackingID, const ShareableSurface::Handle&) OVERRIDE;
+    virtual void clearImageBackingContents(CoordinatedImageBackingID) OVERRIDE;
     virtual void removeImageBacking(CoordinatedImageBackingID) OVERRIDE;
 
     void flushPendingImageBackingChanges();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to