From b1444e524d3f5e888d1ae3300b2658321fc56349 Mon Sep 17 00:00:00 2001 From: Russell Brenner Date: Fri, 18 Mar 2011 13:57:51 -0700 Subject: Fix for FBO offset when drawing with alpha Use new DrawGlInfo struct to detect when drawing to an FBO and adjust topLeft of destination to (0,0). Bug: 3275491 Change-Id: Ia3ef85d6a21475dbd27743a15edd9d16d0d9cc9e --- WebKit/android/nav/WebView.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'WebKit/android') diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index ea311ae..3a156de 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -1490,9 +1490,14 @@ class GLDrawFunctor : Functor { WebCore::IntRect inval; int titlebarHeight = webViewRect.height() - viewRect.height(); - bool retVal = (*wvInstance.*funcPtr)(viewRect, &inval, scale, extras); + + uirenderer::DrawGlInfo* info = reinterpret_cast(data); + WebCore::IntRect localViewRect = viewRect; + if (info->isLayer) + localViewRect.move(-1 * localViewRect.x(), -1 * localViewRect.y()); + + bool retVal = (*wvInstance.*funcPtr)(localViewRect, &inval, scale, extras); if (retVal) { - uirenderer::DrawGlInfo* info = reinterpret_cast(data); IntRect finalInval; if (inval.isEmpty()) { finalInval = webViewRect; -- cgit v1.1