summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2010-11-22 13:01:53 -0800
committerNicolas Roard <nicolas@android.com>2010-11-22 13:01:53 -0800
commit0150e284d85a95236481fa58c868892da3341bb0 (patch)
treebad4e617b635f86636eb336ef03f5da07c169091 /WebCore/platform/graphics
parent72fe21ce816206f22739bef01645c55924df42c1 (diff)
downloadexternal_webkit-0150e284d85a95236481fa58c868892da3341bb0.zip
external_webkit-0150e284d85a95236481fa58c868892da3341bb0.tar.gz
external_webkit-0150e284d85a95236481fa58c868892da3341bb0.tar.bz2
Fix browser ANR when using Hardware Acceleration
Bug:3217947 Change-Id: Ic0da5c4c131026a88afff2acc254a23a4d6a42ff
Diffstat (limited to 'WebCore/platform/graphics')
-rw-r--r--WebCore/platform/graphics/android/BaseLayerAndroid.cpp3
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
index 9e090a6..8d84827 100644
--- a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
@@ -122,7 +122,8 @@ bool BaseLayerAndroid::drawBasePictureInGL(SkRect& viewport, float scale)
XLOG("drawBasePicture, TX: %d, TY: %d scale %.2f", viewportTileBounds.fLeft,
viewportTileBounds.fTop, scale);
- if (scale == m_glWebViewState->currentScale())
+ if (scale == m_glWebViewState->currentScale()
+ || m_glWebViewState->preZoomBounds().isEmpty())
m_glWebViewState->setPreZoomBounds(viewportTileBounds);
// If we have a different scale than the current one, we have to
diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp
index bcb5cbf..4080a8a 100644
--- a/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -77,6 +77,9 @@ GLWebViewState::GLWebViewState()
{
m_tiledPageA = new TiledPage(FIRST_TILED_PAGE_ID, this);
m_tiledPageB = new TiledPage(SECOND_TILED_PAGE_ID, this);
+ m_viewport.setEmpty();
+ m_viewportTileBounds.setEmpty();
+ m_preZoomBounds.setEmpty();
#ifdef DEBUG_COUNT
gGLWebViewStateCount++;
#endif