summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-09-20 18:33:32 -0700
committerJohn Reck <jreck@google.com>2011-09-20 18:35:23 -0700
commit6878a46f6b4ae2a2361199c4326b5dbba9a59c72 (patch)
tree04c5492bd8a603ce7edc11760ef0e69c62b533bb /Source/WebCore/platform/graphics/android
parenta2ddd21f070651d1e10ef703c7841525ef556edc (diff)
downloadexternal_webkit-6878a46f6b4ae2a2361199c4326b5dbba9a59c72.zip
external_webkit-6878a46f6b4ae2a2361199c4326b5dbba9a59c72.tar.gz
external_webkit-6878a46f6b4ae2a2361199c4326b5dbba9a59c72.tar.bz2
Prevent rings from being clipped
Bug: 5348386 Change-Id: I6fd9c1d856be257a1a757649aa85e55d4a14a8d1
Diffstat (limited to 'Source/WebCore/platform/graphics/android')
-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);