Title: [122948] trunk/Source/WebKit2
Revision
122948
Author
[email protected]
Date
2012-07-18 04:53:47 -0700 (Wed, 18 Jul 2012)

Log Message

[Qt][WK2] Caching of ShareableSurfaces breaks tiling.
https://bugs.webkit.org/show_bug.cgi?id=91609

A ShareableSurface should only be cached,
when it is GraphicsSurface based.

Reviewed by Kenneth Rohde Christiansen.

* UIProcess/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
* UIProcess/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (122947 => 122948)


--- trunk/Source/WebKit2/ChangeLog	2012-07-18 11:41:33 UTC (rev 122947)
+++ trunk/Source/WebKit2/ChangeLog	2012-07-18 11:53:47 UTC (rev 122948)
@@ -1,3 +1,18 @@
+2012-07-18  Zeno Albisser  <[email protected]>
+
+        [Qt][WK2] Caching of ShareableSurfaces breaks tiling.
+        https://bugs.webkit.org/show_bug.cgi?id=91609
+
+        A ShareableSurface should only be cached,
+        when it is GraphicsSurface based.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * UIProcess/LayerTreeCoordinatorProxy.cpp:
+        (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
+        * UIProcess/LayerTreeCoordinatorProxy.h:
+        (LayerTreeCoordinatorProxy):
+
 2012-07-18  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Fix a crash due to an invalid assert

Modified: trunk/Source/WebKit2/UIProcess/LayerTreeCoordinatorProxy.cpp (122947 => 122948)


--- trunk/Source/WebKit2/UIProcess/LayerTreeCoordinatorProxy.cpp	2012-07-18 11:41:33 UTC (rev 122947)
+++ trunk/Source/WebKit2/UIProcess/LayerTreeCoordinatorProxy.cpp	2012-07-18 11:53:47 UTC (rev 122948)
@@ -61,26 +61,20 @@
     updateTileForLayer(layerID, tileID, targetRect, updateInfo);
 }
 
-static inline uint64_t createLayerTileUniqueKey(int layerID, int tileID)
-{
-    uint64_t key = layerID;
-    key <<= 32;
-    key |= tileID;
-    return key;
-}
-
 void LayerTreeCoordinatorProxy::updateTileForLayer(int layerID, int tileID, const IntRect& targetRect, const WebKit::SurfaceUpdateInfo& updateInfo)
 {
     RefPtr<ShareableSurface> surface;
 #if USE(GRAPHICS_SURFACE)
-    uint64_t key = createLayerTileUniqueKey(layerID, tileID);
-
-    HashMap<uint64_t, RefPtr<ShareableSurface> >::iterator it = m_surfaces.find(key);
-    if (it == m_surfaces.end()) {
-        surface = ShareableSurface::create(updateInfo.surfaceHandle);
-        m_surfaces.add(key, surface);
+    int token = updateInfo.surfaceHandle.graphicsSurfaceToken();
+    if (token) {
+        HashMap<uint32_t, RefPtr<ShareableSurface> >::iterator it = m_surfaces.find(token);
+        if (it == m_surfaces.end()) {
+            surface = ShareableSurface::create(updateInfo.surfaceHandle);
+            m_surfaces.add(token, surface);
+        } else
+            surface = it->second;
     } else
-        surface = it->second;
+        surface = ShareableSurface::create(updateInfo.surfaceHandle);
 #else
     surface = ShareableSurface::create(updateInfo.surfaceHandle);
 #endif

Modified: trunk/Source/WebKit2/UIProcess/LayerTreeCoordinatorProxy.h (122947 => 122948)


--- trunk/Source/WebKit2/UIProcess/LayerTreeCoordinatorProxy.h	2012-07-18 11:41:33 UTC (rev 122947)
+++ trunk/Source/WebKit2/UIProcess/LayerTreeCoordinatorProxy.h	2012-07-18 11:53:47 UTC (rev 122948)
@@ -79,7 +79,7 @@
     DrawingAreaProxy* m_drawingAreaProxy;
     RefPtr<WebLayerTreeRenderer> m_renderer;
 #if USE(GRAPHICS_SURFACE)
-    HashMap<uint64_t, RefPtr<ShareableSurface> > m_surfaces;
+    HashMap<uint32_t, RefPtr<ShareableSurface> > m_surfaces;
 #endif
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to