summaryrefslogtreecommitdiff
path: root/libs/hwui/Matrix.h
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2015-04-28 11:45:59 -0700
committer Chris Craik <ccraik@google.com> 2015-05-26 17:53:16 -0700
commitfca52b7583d1e5f5ff8ed06554875d2a30ef56fa (patch)
treee383a2db169421a722fa9c559dd01904e83fa504 /libs/hwui/Matrix.h
parentaa1cd25db72297f13539928e8aa45ba992f2f230 (diff)
Use path intersection instead of saveLayer+mesh to mask projected ripples
bug:14297149 SaveLayer's performance cost is high, and proportional to the surface being projected onto. Since ripples (even unbounded ones) are now always projected to the arbitrary background content behind them, this cost is especially important to avoid. This removes the last semi-secret, saveLayer from the projected ripple implementation. Also fixes the HW test app to correctly demonstrate this projection masking behavior. Additionaly, alters PathTessellator to gracefully handle counter-clockwise paths, and simplifies the work done by ShadowTessellator to ensure all of its paths are counterclockwise. Change-Id: Ibe9e12812bd10a774e20b1d444a140c368cbba8c
Diffstat (limited to 'libs/hwui/Matrix.h')
-rw-r--r--libs/hwui/Matrix.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h
index a76013503d5f..c1527893ee2b 100644
--- a/libs/hwui/Matrix.h
+++ b/libs/hwui/Matrix.h
@@ -134,6 +134,12 @@ public:
uint8_t getType() const;
+ void multiplyInverse(const Matrix4& v) {
+ Matrix4 inv;
+ inv.loadInverse(v);
+ multiply(inv);
+ }
+
void multiply(const Matrix4& v) {
Matrix4 u;
u.loadMultiply(*this, v);