Title: [134145] trunk/Source/WebKit2
Revision
134145
Author
commit-qu...@webkit.org
Date
2012-11-09 18:54:28 -0800 (Fri, 09 Nov 2012)

Log Message

Coordinated Graphics: Antialias the edge-tiles of CoordinatedBackingStore.
https://bugs.webkit.org/show_bug.cgi?id=101818

Patch by Huang Dongsung <luxte...@company100.net> on 2012-11-09
Reviewed by Noam Rosenthal.

Since we now have the entire surfaceRect, we can antialias the edge-tiles.

* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
(WebKit::CoordinatedBackingStore::paintTilesToTextureMapper):
(WebKit::CoordinatedBackingStore::paintToTextureMapper):
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
(CoordinatedBackingStore):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (134144 => 134145)


--- trunk/Source/WebKit2/ChangeLog	2012-11-10 02:45:24 UTC (rev 134144)
+++ trunk/Source/WebKit2/ChangeLog	2012-11-10 02:54:28 UTC (rev 134145)
@@ -1,3 +1,18 @@
+2012-11-09  Huang Dongsung  <luxte...@company100.net>
+
+        Coordinated Graphics: Antialias the edge-tiles of CoordinatedBackingStore.
+        https://bugs.webkit.org/show_bug.cgi?id=101818
+
+        Reviewed by Noam Rosenthal.
+
+        Since we now have the entire surfaceRect, we can antialias the edge-tiles.
+
+        * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
+        (WebKit::CoordinatedBackingStore::paintTilesToTextureMapper):
+        (WebKit::CoordinatedBackingStore::paintToTextureMapper):
+        * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
+        (CoordinatedBackingStore):
+
 2012-11-09  Rick Byers  <rby...@chromium.org>
 
         No tests for changing mouse cursors

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp (134144 => 134145)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp	2012-11-10 02:45:24 UTC (rev 134144)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp	2012-11-10 02:54:28 UTC (rev 134145)
@@ -123,17 +123,17 @@
         rect.height() / scale));
 }
 
-static void paintTilesToTextureMapper(Vector<TextureMapperTile*>& tiles, TextureMapper* textureMapper, const TransformationMatrix& transform, float opacity, BitmapTexture* mask, unsigned edgesExposed)
+void CoordinatedBackingStore::paintTilesToTextureMapper(Vector<TextureMapperTile*>& tiles, TextureMapper* textureMapper, const TransformationMatrix& transform, float opacity, BitmapTexture* mask, const FloatRect& rect)
 {
     for (size_t i = 0; i < tiles.size(); ++i) {
         TextureMapperTile* tile = tiles[i];
-        tile->paint(textureMapper, transform, opacity, mask, edgesExposed);
+        tile->paint(textureMapper, transform, opacity, mask, calculateExposedTileEdges(rect, tile->rect()));
         static bool shouldDebug = shouldShowTileDebugVisuals();
         if (!shouldDebug)
             continue;
 
         textureMapper->drawBorder(Color(0xFF, 0, 0), 2, tile->rect(), transform);
-        textureMapper->drawRepaintCounter(static_cast<CoordinatedBackingStoreTile*>(tile)->repaintCount(), 8, tiles[i]->rect().location(), transform);
+        textureMapper->drawRepaintCounter(static_cast<CoordinatedBackingStoreTile*>(tile)->repaintCount(), 8, tile->rect().location(), transform);
     }
 }
 
@@ -164,12 +164,6 @@
         previousTilesToPaint.append(&tile);
     }
 
-    // FIXME: When the TextureMapper makes a distinction between some edges exposed and no edges
-    // exposed, the value passed should be an accurate reflection of the tile subset that we are
-    // passing. For now we just "estimate" since CoordinatedBackingStore doesn't keep information about
-    // the total tiled surface rect at the moment.
-    unsigned edgesExposed = m_tiles.size() > 1 ? TextureMapper::NoEdges : TextureMapper::AllEdges;
-
     ASSERT(!m_size.isZero());
     FloatRect rectOnContents = mapToContents(IntRect(IntPoint::zero(), m_size), m_scale);
     TransformationMatrix adjustedTransform = transform;
@@ -177,8 +171,8 @@
     // See TiledBackingStore.
     adjustedTransform.multiply(TransformationMatrix::rectToRect(rectOnContents, targetRect));
 
-    paintTilesToTextureMapper(previousTilesToPaint, textureMapper, adjustedTransform, opacity, mask, edgesExposed);
-    paintTilesToTextureMapper(tilesToPaint, textureMapper, adjustedTransform, opacity, mask, edgesExposed);
+    paintTilesToTextureMapper(previousTilesToPaint, textureMapper, adjustedTransform, opacity, mask, rectOnContents);
+    paintTilesToTextureMapper(tilesToPaint, textureMapper, adjustedTransform, opacity, mask, rectOnContents);
 }
 
 void CoordinatedBackingStore::commitTileOperations(TextureMapper* textureMapper)

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h (134144 => 134145)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h	2012-11-10 02:45:24 UTC (rev 134144)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h	2012-11-10 02:54:28 UTC (rev 134145)
@@ -71,6 +71,8 @@
     CoordinatedBackingStore()
         : m_scale(1.)
     { }
+    void paintTilesToTextureMapper(Vector<WebCore::TextureMapperTile*>&, WebCore::TextureMapper*, const WebCore::TransformationMatrix&, float, WebCore::BitmapTexture*, const WebCore::FloatRect&);
+
     HashMap<int, CoordinatedBackingStoreTile> m_tiles;
     HashSet<int> m_tilesToRemove;
     WebCore::IntSize m_size;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to