From 2ac76fe4e18c3325c8b3bb8f9435fdc7b96c0aca Mon Sep 17 00:00:00 2001 From: Teng-Hui Zhu Date: Thu, 19 Apr 2012 14:54:31 -0700 Subject: Better handle the EGL context lost situation. Unless framework provide a better message, we can't avoid this EGL context issue totally if mis-match happen again. Clean up some obsolete code. Change-Id: Ica03daecd58f9757c8cad41e0f40d5d51b041748 --- Source/WebCore/platform/graphics/android/rendering/TransferQueue.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/WebCore/platform/graphics/android/rendering/TransferQueue.h') diff --git a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h index d1024a4..fe58336 100644 --- a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h +++ b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h @@ -117,7 +117,6 @@ public: // This will be called by the browser through nativeSetProperty void setTextureUploadType(TextureUploadType type); - void cleanupGLResources(); void updateDirtyTiles(); void initGLResources(int width, int height); @@ -140,10 +139,10 @@ public: void addItemInPureColorQueue(const TileRenderInfo* renderInfo); - void setPendingDiscardWithLock(); - void emptyQueue(); + void cleanupGLResourcesAndQueue(); bool needsInit() { return !m_sharedSurfaceTextureId; } + void resetQueue(); // This queue can be accessed from UI and TexGen thread, therefore, we need // a lock to protect its access TileTransferData* m_transferQueue; @@ -159,6 +158,7 @@ private: const SkBitmap& bitmap); bool getHasGLContext(); void setHasGLContext(bool hasContext); + void emptyAndAbandonQueue(); int getNextTransferQueueIndex(); @@ -174,6 +174,7 @@ private: // Before each draw call and the blit operation, clean up all the // pendingDiscard items. void cleanupPendingDiscard(); + void cleanupGLResources(); void blitTileFromQueue(GLuint fboID, TileTexture* destTex, TileTexture* frontTex, -- cgit v1.1