summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/TiledPage.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/android/TiledPage.h')
-rw-r--r--WebCore/platform/graphics/android/TiledPage.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/android/TiledPage.h b/WebCore/platform/graphics/android/TiledPage.h
index 8be2361..b532033 100644
--- a/WebCore/platform/graphics/android/TiledPage.h
+++ b/WebCore/platform/graphics/android/TiledPage.h
@@ -30,11 +30,13 @@
#include "BaseTile.h"
#include "SkCanvas.h"
+#include "SkRegion.h"
#include "TileSet.h"
namespace WebCore {
class GLWebViewState;
+class IntRect;
typedef std::pair<int, int> TileKey;
typedef HashMap<TileKey, BaseTile*> TileMap;
@@ -68,15 +70,17 @@ public:
void draw(float transparency, SkRect& viewport, int firstTileX, int firstTileY);
// used by individual tiles to generate the bitmap for their tile
- void paintBaseLayerContent(SkCanvas*);
+ unsigned int paintBaseLayerContent(SkCanvas*);
// used by individual tiles to get the information about the current picture
GLWebViewState* glWebViewState() { return m_glWebViewState; }
float scale() const { return m_scale; }
void setScale(float scale) { m_scale = scale; m_invScale = 1 / scale; }
+ void invalidateRect(const IntRect& invalRect, const unsigned int pictureCount);
+
private:
- void setTileLevels(int firstTileX, int firstTileY);
+ void updateTileState(int firstTileX, int firstTileY);
void prepareRow(bool goingLeft, int tilesInRow, int firstTileX, int y, TileSet* set);
BaseTile* getBaseTile(int x, int y);
@@ -86,6 +90,13 @@ private:
float m_scale;
float m_invScale;
GLWebViewState* m_glWebViewState;
+
+ // used to identify the tiles that have been invalidated (marked dirty) since
+ // the last time updateTileState() has been called. The region is stored in
+ // terms of the (x,y) coordinates used to determine the location of the tile
+ // within the page, not in content/view pixel coordinates.
+ SkRegion m_invalRegion;
+ unsigned int m_latestPictureInval;
};
} // namespace WebCore