summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-06-06 11:24:02 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2012-06-07 12:23:20 -0700
commit750f81c3eb609bfd132182bbbb9b467455175498 (patch)
tree1c0f5672223b66964693ea536504ac6f6e750c54 /Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h
parent6f60c96bbd87b5c54d89aeb23ace06ae3647e2f3 (diff)
downloadexternal_webkit-750f81c3eb609bfd132182bbbb9b467455175498.zip
external_webkit-750f81c3eb609bfd132182bbbb9b467455175498.tar.gz
external_webkit-750f81c3eb609bfd132182bbbb9b467455175498.tar.bz2
Add fast drawing path for repeat background image.
In the slow draw path, we are drawing the small background image one by one. Now in the fast path, we can use the GL shader to repeat the iamges. bug:6579681 Change-Id: I8ab413bdd073cb867002b77b36d4a1361290ecb2
Diffstat (limited to 'Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h')
-rw-r--r--Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h
index b43dc83..06aa21b 100644
--- a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h
@@ -34,6 +34,7 @@ namespace WebCore {
class Image;
class RenderLayerCompositor;
class RenderStyle;
+class BackgroundImagePositioning;
class BaseLayerAndroid : public LayerAndroid {
public:
@@ -74,6 +75,14 @@ public:
static Image* GetCachedImage(PassRefPtr<RenderStyle> style);
private:
+ bool drawSimpleQuad(ImageTexture* imageTexture,
+ BackgroundImagePositioning* position,
+ const IntPoint& repeatTimes, const FloatPoint& startPoint,
+ const FloatPoint& origin, const Color& backgroundColor);
+ void drawRepeatedGrid(ImageTexture* imageTexture,
+ BackgroundImagePositioning* position,
+ const IntPoint& repeatTimes, const FloatPoint& startPoint,
+ const FloatPoint& origin, const Color& backgroundColor);
int m_width;
int m_height;
};