summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp1
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp12
2 files changed, 10 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
index 0ab28d7..6c572c4 100644
--- a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
@@ -287,7 +287,6 @@ bool BaseLayerAndroid::drawGL(double currentTime, LayerAndroid* compositedRoot,
m_glWebViewState->resetLayersDirtyArea();
}
- m_glWebViewState->paintExtras();
m_previousVisible = visibleRect;
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index 40a9428..55419f4 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -180,8 +180,12 @@ void GLWebViewState::setRings(Vector<IntRect>& rings, bool isPressed)
android::Mutex::Autolock lock(m_baseLayerLock);
m_displayRings = true;
m_rings.setEmpty();
- for (size_t i = 0; i < rings.size(); i++)
- m_rings.op(rings.at(i), SkRegion::kUnion_Op);
+ for (size_t i = 0; i < rings.size(); i++) {
+ if (i == 0)
+ m_rings.setRect(rings.at(i));
+ else
+ m_rings.op(rings.at(i), SkRegion::kUnion_Op);
+ }
m_ringsIsPressed = isPressed;
}
@@ -571,6 +575,10 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect,
double currentTime = setupDrawing(rect, viewport, webViewRect, titleBarHeight, clip, scale);
bool ret = baseLayer->drawGL(currentTime, compositedRoot, rect,
viewport, scale, buffersSwappedPtr);
+ // Reset the clip to make sure we can draw the rings. If this isn't done, the
+ // current clip will be the clip of whatever layer was last drawn
+ TilesManager::instance()->shader()->clip(clip);
+ paintExtras();
glBindBuffer(GL_ARRAY_BUFFER, 0);