summaryrefslogtreecommitdiff
path: root/libs/hwui/Rect.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2013-02-04 16:16:33 -0800
committerChris Craik <ccraik@google.com>2013-02-15 13:30:09 -0800
commitc3566d06421c8acc0aafb18f7e307e5725ce87e1 (patch)
tree3807ef3c1825ce9154bf3bc84fe24f34b331702a /libs/hwui/Rect.h
parent101ae3bb3909827303121e5e11ed16b7efe36538 (diff)
DisplayList draw operation reordering
bug:8037003 The reordering enables similar operations to draw together, minimizing the OpenGL state change operations that go inbetween draws. Eventually, multiple complete canvas draw operations will be merged (into a single glDrawArrays call, for example) Reorders DisplayList draw operations when: -They can move backwards in the command stream to be after similar operations without violating draw ordering -The OpenGLRenderer is in a simple, replayable state (no complex clip, or filter/shadow etc) Also adds two system properties to control the deferral/reordering: "debug.hwui.disable_draw_defer" "debug.hwui.disable_draw_reorder" which can be set to "true" to control the display list manipulation Change-Id: I5e89f3cb0ea2d2afd3e15c64d7f32b8406777a32
Diffstat (limited to 'libs/hwui/Rect.h')
-rw-r--r--libs/hwui/Rect.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h
index 5f4bb5a20913..f50ac3ccdb00 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -159,6 +159,13 @@ public:
bottom += dy;
}
+ void outset(float delta) {
+ left -= delta;
+ top -= delta;
+ right += delta;
+ bottom += delta;
+ }
+
void snapToPixelBoundaries() {
left = floorf(left + 0.5f);
top = floorf(top + 0.5f);