summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/BaseTile.h
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2010-11-05 08:12:51 -0400
committerDerek Sollenberger <djsollen@google.com>2010-11-11 09:16:38 -0500
commitffc715a2e6382fe9e331557c35fafc426507b8f5 (patch)
tree577666e385afbe4332e11e79d3246f0751f1a9fe /WebCore/platform/graphics/android/BaseTile.h
parenta1e806ed3b2d9e2727d08cc2a3958fce501f6f33 (diff)
downloadexternal_webkit-ffc715a2e6382fe9e331557c35fafc426507b8f5.zip
external_webkit-ffc715a2e6382fe9e331557c35fafc426507b8f5.tar.gz
external_webkit-ffc715a2e6382fe9e331557c35fafc426507b8f5.tar.bz2
Use a fixed number of BaseTiles per TiledPage.
This CL ensures that the TiledPage only keeps track of BaseTiles that are backed by a texture. In order to avoid unecessary allocations on the stack we pre-allocate the memory for the tiles and reuse tiles. Change-Id: I894cf4d5c6b564169ccf7a967629f5d670a5426d
Diffstat (limited to 'WebCore/platform/graphics/android/BaseTile.h')
-rw-r--r--WebCore/platform/graphics/android/BaseTile.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/BaseTile.h b/WebCore/platform/graphics/android/BaseTile.h
index 8870cbf..8f095e3 100644
--- a/WebCore/platform/graphics/android/BaseTile.h
+++ b/WebCore/platform/graphics/android/BaseTile.h
@@ -64,9 +64,12 @@ public:
#ifdef DEBUG_COUNT
static int count();
#endif
- BaseTile(TiledPage* page, int x, int y);
+ BaseTile();
~BaseTile();
+ void setContents(TiledPage* page, int x, int y);
+ bool isAvailable() const { return !m_texture; }
+
void reserveTexture();
void removeTexture();
void setUsedLevel(int);