diff options
author | Chris Craik <ccraik@google.com> | 2012-04-20 11:28:59 -0700 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2012-04-24 13:17:58 -0700 |
commit | 32ce41e0241790f20e63cafea4d3c1db87423eec (patch) | |
tree | a72d776306a0a76d099f3997c35a84a4750fa02f /Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp | |
parent | 492bcfac9fc25b61f44811050fb0cfe827eb6a08 (diff) | |
download | external_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/TileTexture.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp b/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp index 3dceda9..54c67cc 100644 --- a/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp @@ -120,7 +120,8 @@ void TileTexture::transferComplete() void TileTexture::drawGL(bool isLayer, const SkRect& rect, float opacity, const TransformationMatrix* transform, - bool forceBlending, bool usePointSampling) + bool forceBlending, bool usePointSampling, + const FloatPoint& fillPortion) { ShaderProgram* shader = TilesManager::instance()->shader(); @@ -134,7 +135,7 @@ void TileTexture::drawGL(bool isLayer, const SkRect& rect, float opacity, // TODO: Don't blend tiles if they are fully opaque. bool useBlending = forceBlending || isLayer; DrawQuadData commonData(isLayer ? LayerQuad : BaseQuad, transform, &rect, - opacity, useBlending); + opacity, useBlending, fillPortion); if (isPureColor()) { PureColorQuadData data(commonData, pureColor()); shader->drawQuad(&data); |