From f7142c016687e13068e6954fe82895784ba8e0b2 Mon Sep 17 00:00:00 2001 From: Teng-Hui Zhu Date: Thu, 7 Jun 2012 16:35:57 -0700 Subject: Make sure we gather the textures before any prepare work The available tile textures pool is not updated while we try to prepare image. This can lead to getting obsolete tile textures. bug:6613009 Change-Id: I0170f0cfba197c7a7ed48866028b30075417af30 --- Source/WebCore/platform/graphics/android/GLWebViewState.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/WebCore/platform/graphics/android') diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index d0273cf..55c4eec 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -342,6 +342,10 @@ int GLWebViewState::drawGL(IntRect& invScreenRect, SkRect& visibleContentRect, tilesManager->updateTilesIfContextVerified(); + // gather the textures we can use, make sure this happens before any + // texture preparation work. + tilesManager->gatherTextures(); + // Upload any pending ImageTexture // Return true if we still have some images to upload. // TODO: upload as many textures as possible within a certain time limit @@ -354,9 +358,6 @@ int GLWebViewState::drawGL(IntRect& invScreenRect, SkRect& visibleContentRect, scale = 1.0f; // WORKAROUND for corrupted scale: use 1.0 } - // gather the textures we can use - tilesManager->gatherTextures(); - double currentTime = setupDrawing(invScreenRect, visibleContentRect, screenRect, titleBarHeight, screenClip, scale); -- cgit v1.1