summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-04-17 10:38:53 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2012-04-17 14:47:34 -0700
commit3efc67e0caf0b63fe0350d6896d2cbc08661f5d7 (patch)
tree041cfeae876cee9bde2f6c117a52b9657b36fe3a /Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
parentc9efa1bf37f8bbf12a5b5dd465cbfb06c8053d9c (diff)
downloadexternal_webkit-3efc67e0caf0b63fe0350d6896d2cbc08661f5d7.zip
external_webkit-3efc67e0caf0b63fe0350d6896d2cbc08661f5d7.tar.gz
external_webkit-3efc67e0caf0b63fe0350d6896d2cbc08661f5d7.tar.bz2
Enable point sample when the texel and pixel is 1:1 mapping.
Change-Id: I532ad6b038d3b141bd212c8c408533fec0e9616e
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
index 00cc656..ad305b7 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
@@ -296,6 +296,9 @@ void TileGrid::drawGL(const IntRect& visibleArea, float opacity,
missingRegion = SkRegion(totalArea);
}
+ bool usePointSampling =
+ TilesManager::instance()->shader()->usePointSampling(m_scale, transform);
+
for (unsigned int i = 0; i < m_tiles.size(); i++) {
Tile* tile = m_tiles[i];
@@ -312,7 +315,7 @@ void TileGrid::drawGL(const IntRect& visibleArea, float opacity,
bool forceBaseBlending = background ? background->hasAlpha() : false;
bool success = tile->drawGL(opacity, rect, m_scale, transform,
- forceBaseBlending);
+ forceBaseBlending, usePointSampling);
if (semiOpaqueBaseSurface && success) {
// Cut the successful drawn tile area from the missing region.
missingRegion.op(SkIRect::MakeXYWH(tile->x(), tile->y(), 1, 1),