diff options
author | Romain Guy <romainguy@google.com> | 2011-03-17 11:08:18 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2011-03-17 12:05:44 -0700 |
commit | d1f5cf1ad8b20860bd9cb34a483451019124d1f9 (patch) | |
tree | a52c7598cd0e4a5bdf529c549d204d16caac2dcb /WebKit | |
parent | 0873a1ca347be828725b2cfb077a3574c5b2c6d1 (diff) | |
download | external_webkit-d1f5cf1ad8b20860bd9cb34a483451019124d1f9.zip external_webkit-d1f5cf1ad8b20860bd9cb34a483451019124d1f9.tar.gz external_webkit-d1f5cf1ad8b20860bd9cb34a483451019124d1f9.tar.bz2 |
Use libhwui's new private header.
Bug #3275491
The DrawGlInfo struct is used by the OpenGL UI renderer and WebView to exchange
information. This new version of the struct adds information about the render
target and the current transform set on the Canvas.
Change-Id: I4922ad4b4f455eacad804bc5e803029f94a5b1ea
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 66da4c3..6358f7b 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -43,6 +43,7 @@ #include "LayerAndroid.h" #include "Node.h" #include "utils/Functor.h" +#include "private/hwui/DrawGlInfo.h" #include "PlatformGraphicsContext.h" #include "PlatformString.h" #include "ScrollableLayerAndroid.h" @@ -1495,25 +1496,11 @@ class GLDrawFunctor : Functor { return 0; } - struct DrawConstraints { - // Input: clip rect as set on the Canvas, in screen coordinates - int clipLeft; - int clipTop; - int clipRight; - int clipBottom; - - // Output: dirty region that must be redrawn - float dirtyLeft; - float dirtyTop; - float dirtyRight; - float dirtyBottom; - }; - WebCore::IntRect inval; int titlebarHeight = webViewRect.height() - viewRect.height(); bool retVal = (*wvInstance.*funcPtr)(viewRect, &inval, scale, extras); if (retVal) { - DrawConstraints* constraints = reinterpret_cast<DrawConstraints*>(data); + uirenderer::DrawGlInfo* info = reinterpret_cast<uirenderer::DrawGlInfo*>(data); IntRect finalInval; if (inval.isEmpty()) { finalInval = webViewRect; @@ -1525,10 +1512,10 @@ class GLDrawFunctor : Functor { finalInval.setHeight(inval.height()); finalInval.intersect(webViewRect); } - constraints->dirtyLeft = finalInval.x(); - constraints->dirtyTop = finalInval.y(); - constraints->dirtyRight = finalInval.right(); - constraints->dirtyBottom = finalInval.bottom(); + info->dirtyLeft = finalInval.x(); + info->dirtyTop = finalInval.y(); + info->dirtyRight = finalInval.right(); + info->dirtyBottom = finalInval.bottom(); } // return 1 if invalidation needed, 0 otherwise return retVal ? 1 : 0; |