diff options
author | Russell Brenner <russellbrenner@google.com> | 2011-03-18 13:57:51 -0700 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2011-03-18 16:24:57 -0700 |
commit | b1444e524d3f5e888d1ae3300b2658321fc56349 (patch) | |
tree | b89f4d0d611161145d118482185e8ee61ca774e4 /WebKit/android | |
parent | 9af1c3b94981315f36e34dea401adedbbb98d7da (diff) | |
download | external_webkit-b1444e524d3f5e888d1ae3300b2658321fc56349.zip external_webkit-b1444e524d3f5e888d1ae3300b2658321fc56349.tar.gz external_webkit-b1444e524d3f5e888d1ae3300b2658321fc56349.tar.bz2 |
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
Diffstat (limited to 'WebKit/android')
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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<uirenderer::DrawGlInfo*>(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<uirenderer::DrawGlInfo*>(data); IntRect finalInval; if (inval.isEmpty()) { finalInval = webViewRect; |