From 58eca1f9d6c243c24ca8a07bdca0539780f714f2 Mon Sep 17 00:00:00 2001 From: John Reck Date: Mon, 7 Nov 2011 11:21:27 -0800 Subject: Fix extras clipping Bug: 5556494 Change-Id: I82e8282271dfc623afa9b1ef0d0061ca9c3df5f4 --- Source/WebCore/platform/graphics/android/GLExtras.cpp | 3 --- Source/WebCore/platform/graphics/android/GLWebViewState.cpp | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'Source/WebCore') diff --git a/Source/WebCore/platform/graphics/android/GLExtras.cpp b/Source/WebCore/platform/graphics/android/GLExtras.cpp index c6cb7f3..873ea33 100644 --- a/Source/WebCore/platform/graphics/android/GLExtras.cpp +++ b/Source/WebCore/platform/graphics/android/GLExtras.cpp @@ -202,8 +202,6 @@ void GLExtras::drawFindOnPage(SkRect& viewport) void GLExtras::drawGL(IntRect& webViewRect, SkRect& viewport, int titleBarHeight) { if (m_drawExtra) { - // TODO: Support clipping - glDisable(GL_SCISSOR_TEST); if (m_drawExtra == m_ring) drawCursorRings(); else if (m_drawExtra == m_findOnPage) @@ -211,6 +209,5 @@ void GLExtras::drawGL(IntRect& webViewRect, SkRect& viewport, int titleBarHeight else XLOGC("m_drawExtra %p is unknown! (cursor: %p, find: %p", m_drawExtra, m_ring, m_findOnPage); - glEnable(GL_SCISSOR_TEST); } } diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index a44a743..489a337 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -474,6 +474,8 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect, double currentTime = setupDrawing(rect, viewport, webViewRect, titleBarHeight, clip, scale); ret |= baseLayer->drawGL(currentTime, compositedRoot, rect, viewport, scale, buffersSwappedPtr); + FloatRect extrasclip(0, 0, rect.width(), rect.height()); + TilesManager::instance()->shader()->clip(extrasclip); m_glExtras.drawGL(webViewRect, viewport, titleBarHeight); glBindBuffer(GL_ARRAY_BUFFER, 0); -- cgit v1.1