Title: [108408] trunk/Source/WebKit2
Revision
108408
Author
[email protected]
Date
2012-02-21 15:33:49 -0800 (Tue, 21 Feb 2012)

Log Message

[Qt][WK2] Draw tiles of previous contents-scale for opaque layers if they don't intersect with previous tiles
https://bugs.webkit.org/show_bug.cgi?id=78962

Only avoid painting old-scale tiles in semi-transparent situtations if the old
tiles intersect with existing tiles.

Reviewed by Kenneth Rohde Christiansen.

* UIProcess/qt/LayerBackingStore.cpp:
(WebKit::LayerBackingStore::paintToTextureMapper):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (108407 => 108408)


--- trunk/Source/WebKit2/ChangeLog	2012-02-21 23:30:52 UTC (rev 108407)
+++ trunk/Source/WebKit2/ChangeLog	2012-02-21 23:33:49 UTC (rev 108408)
@@ -1,5 +1,18 @@
 2012-02-21  No'am Rosenthal  <[email protected]>
 
+        [Qt][WK2] Draw tiles of previous contents-scale for opaque layers if they don't intersect with previous tiles
+        https://bugs.webkit.org/show_bug.cgi?id=78962
+
+        Only avoid painting old-scale tiles in semi-transparent situtations if the old
+        tiles intersect with existing tiles.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * UIProcess/qt/LayerBackingStore.cpp:
+        (WebKit::LayerBackingStore::paintToTextureMapper):
+
+2012-02-21  No'am Rosenthal  <[email protected]>
+
         [Qt] Previous web page appears outside content rect
         https://bugs.webkit.org/show_bug.cgi?id=78816
 

Modified: trunk/Source/WebKit2/UIProcess/qt/LayerBackingStore.cpp (108407 => 108408)


--- trunk/Source/WebKit2/UIProcess/qt/LayerBackingStore.cpp	2012-02-21 23:30:52 UTC (rev 108407)
+++ trunk/Source/WebKit2/UIProcess/qt/LayerBackingStore.cpp	2012-02-21 23:33:49 UTC (rev 108408)
@@ -100,6 +100,7 @@
 
     // We have to do this every time we paint, in case the opacity has changed.
     HashMap<int, LayerBackingStoreTile>::iterator end = m_tiles.end();
+    FloatRect coveredRect;
     for (HashMap<int, LayerBackingStoreTile>::iterator it = m_tiles.begin(); it != end; ++it) {
         LayerBackingStoreTile& tile = it->second;
         if (!tile.texture())
@@ -107,12 +108,17 @@
 
         if (tile.scale() == m_scale) {
             tilesToPaint.append(&tile);
+            coveredRect.unite(tile.rect());
             continue;
         }
 
         // Only show the previous tile if the opacity is high, otherwise effect looks like a bug.
-        if (opacity > 0.95)
-            tilesToPaint.prepend(&tile);
+        // We show the previous-scale tile anyway if it doesn't intersect with any current-scale tile.
+        if (opacity < 0.95 && coveredRect.intersects(tile.rect()))
+            continue;
+
+        tilesToPaint.prepend(&tile);
+        coveredRect.unite(tile.rect());
     }
 
     bool shouldClip = !targetRect.contains(coveredRect);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to