summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/Tile.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-04-20 11:28:59 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2012-04-24 13:17:58 -0700
commit32ce41e0241790f20e63cafea4d3c1db87423eec (patch)
treea72d776306a0a76d099f3997c35a84a4750fa02f /Source/WebCore/platform/graphics/android/rendering/Tile.cpp
parent492bcfac9fc25b61f44811050fb0cfe827eb6a08 (diff)
downloadexternal_webkit-32ce41e0241790f20e63cafea4d3c1db87423eec.zip
external_webkit-32ce41e0241790f20e63cafea4d3c1db87423eec.tar.gz
external_webkit-32ce41e0241790f20e63cafea4d3c1db87423eec.tar.bz2
Don't overdraw TileGrids
Given the visible area info, we can just tune the shader and matrix to draw partial tile at the edge of TileGrids. This could save a lot of GPU time. Change-Id: I1a45aa9a3a76ab5894096828bfff83057b1c9272
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/Tile.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/Tile.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/Tile.cpp b/Source/WebCore/platform/graphics/android/rendering/Tile.cpp
index f2aa9a0..0501777 100644
--- a/Source/WebCore/platform/graphics/android/rendering/Tile.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/Tile.cpp
@@ -209,7 +209,8 @@ void Tile::setRepaintPending(bool pending)
bool Tile::drawGL(float opacity, const SkRect& rect, float scale,
const TransformationMatrix* transform,
- bool forceBlending, bool usePointSampling)
+ bool forceBlending, bool usePointSampling,
+ const FloatPoint& fillPortion)
{
if (m_x < 0 || m_y < 0 || m_scale != scale)
return false;
@@ -219,8 +220,12 @@ bool Tile::drawGL(float opacity, const SkRect& rect, float scale,
if (!m_frontTexture)
return false;
+ if (fillPortion.x() < 1.0f || fillPortion.y() < 1.0f)
+ ALOGV("drawing tile %p (%d, %d with fill portions %f %f",
+ this, m_x, m_y, fillPortion.x(), fillPortion.y());
+
m_frontTexture->drawGL(isLayerTile(), rect, opacity, transform,
- forceBlending, usePointSampling);
+ forceBlending, usePointSampling, fillPortion);
return true;
}