summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/DrawQuadData.h
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/DrawQuadData.h
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/DrawQuadData.h')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/DrawQuadData.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/DrawQuadData.h b/Source/WebCore/platform/graphics/android/rendering/DrawQuadData.h
index 687808d..bce82f2 100644
--- a/Source/WebCore/platform/graphics/android/rendering/DrawQuadData.h
+++ b/Source/WebCore/platform/graphics/android/rendering/DrawQuadData.h
@@ -29,6 +29,7 @@
#if USE(ACCELERATED_COMPOSITING)
#include "Color.h"
+#include "FloatPoint.h"
#include "SkRect.h"
#include <GLES2/gl2.h>
@@ -49,12 +50,14 @@ public:
const TransformationMatrix* drawMatrix = 0,
const SkRect* geometry = 0,
float opacity = 1.0f,
- bool forceBlending = true)
+ bool forceBlending = true,
+ FloatPoint fillPortion = FloatPoint(1.0f, 1.0f))
: m_type(type)
, m_drawMatrix(drawMatrix)
, m_geometry(geometry)
, m_opacity(opacity)
, m_forceBlending(forceBlending)
+ , m_fillPortion(fillPortion.x(), fillPortion.y())
{
}
@@ -64,6 +67,7 @@ public:
, m_geometry(data.m_geometry)
, m_opacity(data.m_opacity)
, m_forceBlending(data.m_forceBlending)
+ , m_fillPortion(data.m_fillPortion.x(), data.m_fillPortion.y())
{
}
@@ -86,6 +90,7 @@ public:
virtual int textureId() const { return 0; }
virtual GLint textureFilter() const { return 0; }
virtual GLenum textureTarget() const { return 0; }
+ virtual FloatPoint fillPortion() const { return m_fillPortion; }
private:
DrawQuadType m_type;
@@ -93,6 +98,7 @@ private:
const SkRect* m_geometry;
float m_opacity;
bool m_forceBlending;
+ FloatPoint m_fillPortion;
};
class PureColorQuadData : public DrawQuadData {