From: John Reck Date: Mon, 7 Nov 2011 19:21:27 +0000 (-0800) Subject: Fix extras clipping X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=58eca1f9d6c243c24ca8a07bdca0539780f714f2;hp=82ccbd8ce95211b4b5afad6a653462fd3beb771b;p=android-x86%2Fexternal-webkit.git Fix extras clipping Bug: 5556494 Change-Id: I82e8282271dfc623afa9b1ef0d0061ca9c3df5f4 --- diff --git a/Source/WebCore/platform/graphics/android/GLExtras.cpp b/Source/WebCore/platform/graphics/android/GLExtras.cpp index c6cb7f384..873ea3388 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 a44a743eb..489a337c5 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);