summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListOp.h
diff options
context:
space:
mode:
authorTom Hudson <tomhudson@google.com>2015-06-30 11:26:13 -0400
committerTom Hudson <tomhudson@google.com>2015-07-09 16:15:31 -0400
commitac7b6d33d23cb0baaf61c723346198d41f012035 (patch)
tree9302223ad4dd2337f6e6b4524fe83032532c20a4 /libs/hwui/DisplayListOp.h
parent937edac8e8583023019b625dd426ebf65169e30d (diff)
downloadframeworks_base-ac7b6d33d23cb0baaf61c723346198d41f012035.zip
frameworks_base-ac7b6d33d23cb0baaf61c723346198d41f012035.tar.gz
frameworks_base-ac7b6d33d23cb0baaf61c723346198d41f012035.tar.bz2
New setLocalMatrix() operation for HWUI
Concats any matrix passed through from DisplayListCanvas with the initialTransform of the containing RenderNode. BUG:22189925 Change-Id: I5ea54a6e2a29520c79a8860bde7682694e8595d2
Diffstat (limited to 'libs/hwui/DisplayListOp.h')
-rw-r--r--libs/hwui/DisplayListOp.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index d2bf138..8b4b4ba 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -489,6 +489,25 @@ private:
const SkMatrix mMatrix;
};
+class SetLocalMatrixOp : public StateOp {
+public:
+ SetLocalMatrixOp(const SkMatrix& matrix)
+ : mMatrix(matrix) {}
+
+ virtual void applyState(OpenGLRenderer& renderer, int saveCount) const override {
+ renderer.setLocalMatrix(mMatrix);
+ }
+
+ virtual void output(int level, uint32_t logFlags) const override {
+ OP_LOG("SetLocalMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(&mMatrix));
+ }
+
+ virtual const char* name() override { return "SetLocalMatrix"; }
+
+private:
+ const SkMatrix mMatrix;
+};
+
class ConcatMatrixOp : public StateOp {
public:
ConcatMatrixOp(const SkMatrix& matrix)