From 772742124c1e5c700120019397dc8af29ced74c0 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Tue, 22 Mar 2011 14:29:12 -0700 Subject: Fix performance problems with layers We were preventing the layers' positions to be updated while waiting for the base surface to render. This also fix some repainting issues. bug:4136077 Change-Id: I6870faf8296e205c6ee58e80b1cf95833a67814b --- WebCore/platform/graphics/android/LayerAndroid.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'WebCore/platform/graphics/android/LayerAndroid.cpp') diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index 009915e..dc40fb1 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -928,8 +928,10 @@ bool LayerAndroid::drawGL(GLWebViewState* glWebViewState, SkMatrix& matrix) { TilesManager::instance()->shader()->clip(m_clippingRect); - if (prepareContext() && m_drawingTexture) { + if (m_drawingTexture) { TextureInfo* textureInfo = m_drawingTexture->consumerLock(); + if (!m_drawingTexture->readyFor(this)) + m_dirty = true; if (textureInfo) { SkRect bounds; bounds.set(m_drawingTexture->rect()); @@ -943,6 +945,8 @@ bool LayerAndroid::drawGL(GLWebViewState* glWebViewState, SkMatrix& matrix) m_drawOpacity, true); } m_drawingTexture->consumerRelease(); + } else { + m_dirty = true; } // When the layer is dirty, the UI thread should be notified to redraw. -- cgit v1.1