diff options
author | Romain Guy <romainguy@google.com> | 2011-03-17 11:08:18 -0700 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2011-03-18 14:42:25 -0700 |
commit | 43662260d662cff5e07080bb85adec49abfd477d (patch) | |
tree | 7d7428bc644e6945686d28b552d28cff49ff84a3 /WebKit/android/nav | |
parent | 1ae2d07bc763fbb9dc3df9a62631d2f8fb707ce2 (diff) | |
download | external_webkit-43662260d662cff5e07080bb85adec49abfd477d.zip external_webkit-43662260d662cff5e07080bb85adec49abfd477d.tar.gz external_webkit-43662260d662cff5e07080bb85adec49abfd477d.tar.bz2 |
DO NOT MERGE 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: Icc3bcc278898493ef4fe0f4574b231e6cfd6aca5
Diffstat (limited to 'WebKit/android/nav')
-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 6e85873..384c29e 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" @@ -1487,25 +1488,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; @@ -1517,10 +1504,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; |