summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
author Russell Brenner <russellbrenner@google.com> 2011-03-18 15:32:18 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2011-03-18 15:32:18 -0700
commite68dc1576f2a27de17da41129778df331cda1f3f (patch)
treee7d044ec6db8c48713cee0a55d424fde0f18a96d /libs/hwui/OpenGLRenderer.cpp
parenteb52fb32297219efbd6add01586f06f32b260c58 (diff)
parenta0dc8da2ab0a084432c7094e434b7957dd2eaf5c (diff)
am a0dc8da2: Merge "DO NOT MERGE Send WebView the current transform and whether we\'re drawing a layer. Bug #3275491" into honeycomb-mr1
* commit 'a0dc8da2ab0a084432c7094e434b7957dd2eaf5c': DO NOT MERGE Send WebView the current transform and whether we're drawing a layer. Bug #3275491
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-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 d26580408be8..d9d7d231a38f 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);
}