Overdraw avoidance and merging of clipped ops

bug:8951267

If an opaque op, or group of opaque ops covers the invalidate region,
skip draw operations that precede it.

Clipped operations may now be merged, but only if they share a
clipRect - this is a very case for e.g. ListView, where all background
elements may now be a part of the same MergingDrawBatch.

It is this more aggressive merging that groups together clipped
background elements in the ListView case, enabling the overdraw
avoidance skipping the window background.

Change-Id: Ib0961977e272c5ac37f59e4c67d828467422d259
diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h
index df744be..af520bd 100644
--- a/libs/hwui/Matrix.h
+++ b/libs/hwui/Matrix.h
@@ -26,6 +26,12 @@
 namespace android {
 namespace uirenderer {
 
+#define MATRIX_STRING "[%.2f %.2f %.2f] [%.2f %.2f %.2f] [%.2f %.2f %.2f]"
+#define MATRIX_ARGS(m) \
+    (m)->get(0), (m)->get(1), (m)->get(2), \
+    (m)->get(3), (m)->get(4), (m)->get(5), \
+    (m)->get(6), (m)->get(7), (m)->get(8)
+
 ///////////////////////////////////////////////////////////////////////////////
 // Classes
 ///////////////////////////////////////////////////////////////////////////////