From 750f81c3eb609bfd132182bbbb9b467455175498 Mon Sep 17 00:00:00 2001 From: Teng-Hui Zhu Date: Wed, 6 Jun 2012 11:24:02 -0700 Subject: 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 --- .../WebCore/platform/graphics/android/layers/BaseLayerAndroid.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h') 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 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; }; -- cgit v1.1