summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-03-17 11:06:57 -0700
committerRomain Guy <romainguy@android.com>2011-03-17 12:04:04 -0700
commit08aa2cbd5e62e7ca140f78f8bea0477a19880fd9 (patch)
tree12e37d2b0cba0d0913f71374b1e5298fe41d4daf /libs/hwui
parent4d733f520707a3b52410297b5e16bb289c40e73b (diff)
downloadframeworks_base-08aa2cbd5e62e7ca140f78f8bea0477a19880fd9.zip
frameworks_base-08aa2cbd5e62e7ca140f78f8bea0477a19880fd9.tar.gz
frameworks_base-08aa2cbd5e62e7ca140f78f8bea0477a19880fd9.tar.bz2
Send WebView the current transform and whether we're drawing a layer.
Bug #3275491 These can be used by WebView to correctly apply alpha and geometric transforms. Change-Id: I2ecd4376d68df886dead3c9240317de33f56828f
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp32
1 files changed, 11 insertions, 21 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index d265804..d9d7d23 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -26,6 +26,8 @@
#include <utils/Log.h>
#include <utils/StopWatch.h>
+#include <private/hwui/DrawGlInfo.h>
+
#include <ui/Rect.h>
#include "OpenGLRenderer.h"
@@ -227,30 +229,18 @@ bool OpenGLRenderer::callDrawGLFunction(Functor *functor, Rect& dirty) {
}
#endif
- struct {
- // Input: current clip rect
- int clipLeft;
- int clipTop;
- int clipRight;
- int clipBottom;
-
- // Output: dirty region to redraw
- float dirtyLeft;
- float dirtyTop;
- float dirtyRight;
- float dirtyBottom;
- } constraints;
-
- constraints.clipLeft = clip.left;
- constraints.clipTop = clip.top;
- constraints.clipRight = clip.right;
- constraints.clipBottom = clip.bottom;
+ DrawGlInfo info;
+ info.clipLeft = clip.left;
+ info.clipTop = clip.top;
+ info.clipRight = clip.right;
+ info.clipBottom = clip.bottom;
+ info.isLayer = hasLayer();
+ getSnapshot()->transform->copyTo(&info.transform[0]);
- status_t result = (*functor)(0, &constraints);
+ status_t result = (*functor)(0, &info);
if (result != 0) {
- Rect localDirty(constraints.dirtyLeft, constraints.dirtyTop,
- constraints.dirtyRight, constraints.dirtyBottom);
+ Rect localDirty(info.dirtyLeft, info.dirtyTop, info.dirtyRight, info.dirtyBottom);
dirty.unionWith(localDirty);
}