summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-05-15 10:10:50 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2012-05-15 11:04:08 -0700
commitbbaf943fc6f340f257b9fce2ec802b1cf2deed36 (patch)
tree97b0766834bc4f2e436f404eabc244df0af64e2c /Source/WebCore/platform/graphics/android/rendering/TransferQueue.h
parenteb4dd05cf87c2fcd52fa31fbfe0b110dea7e0cf0 (diff)
downloadexternal_webkit-bbaf943fc6f340f257b9fce2ec802b1cf2deed36.zip
external_webkit-bbaf943fc6f340f257b9fce2ec802b1cf2deed36.tar.gz
external_webkit-bbaf943fc6f340f257b9fce2ec802b1cf2deed36.tar.bz2
ref count the surface to keep the tiles alive for transfer queue
bug:6317924 Change-Id: If0a56ee48247d924f5a4cbd2dcac2cbb3faf0adb
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/TransferQueue.h')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TransferQueue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h
index 44d3c37..9d33ff5 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h
+++ b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h
@@ -37,6 +37,7 @@
namespace WebCore {
class Tile;
+class TilePainter;
class TileTexture;
struct GLState {
@@ -75,6 +76,7 @@ public:
TileTransferData()
: status(emptyItem)
, savedTilePtr(0)
+ , savedTilePainter(0)
, savedTileTexturePtr(0)
, uploadType(DEFAULT_UPLOAD_TYPE)
, bitmap(0)
@@ -90,6 +92,7 @@ public:
TransferItemStatus status;
Tile* savedTilePtr;
+ TilePainter* savedTilePainter; // Ref count the tilePainter to keep the tile alive.
TileTexture* savedTileTexturePtr;
TextureUploadType uploadType;
// This is only useful in Cpu upload code path, so it will be dynamically
@@ -178,10 +181,12 @@ private:
GLuint srcTexId, GLenum srcTexTarget,
int index);
+ void clearItemInTranferQueue(int index);
void addItemCommon(const TileRenderInfo* renderInfo,
TextureUploadType type, TileTransferData* data);
void updatePureColorTiles();
+ void clearPureColorQueue();
// Note that the m_transferQueueIndex only changed in the TexGen thread
// where we are going to move on to update the next item in the queue.
int m_transferQueueIndex;