summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.h
diff options
context:
space:
mode:
author Tom Hudson <tomhudson@google.com> 2015-06-30 11:26:13 -0400
committer Tom Hudson <tomhudson@google.com> 2015-07-09 16:15:31 -0400
commitac7b6d33d23cb0baaf61c723346198d41f012035 (patch)
tree9302223ad4dd2337f6e6b4524fe83032532c20a4 /libs/hwui/OpenGLRenderer.h
parent937edac8e8583023019b625dd426ebf65169e30d (diff)
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/OpenGLRenderer.h')
-rwxr-xr-xlibs/hwui/OpenGLRenderer.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 800a9f9cf18f..402f6edd475d 100755
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -368,6 +368,7 @@ public:
void getMatrix(SkMatrix* outMatrix) const { mState.getMatrix(outMatrix); }
void setMatrix(const SkMatrix& matrix) { mState.setMatrix(matrix); }
+ void setLocalMatrix(const SkMatrix& matrix);
void concatMatrix(const SkMatrix& matrix) { mState.concatMatrix(matrix); }
void translate(float dx, float dy, float dz = 0.0f);
@@ -418,6 +419,8 @@ public:
return returnPath;
}
+ void setBaseTransform(const Matrix4& matrix) { mBaseTransform = matrix; }
+
protected:
/**
* Perform the setup specific to a frame. This method does not
@@ -877,6 +880,16 @@ private:
// Paths kept alive for the duration of the frame
std::vector<std::unique_ptr<SkPath>> mTempPaths;
+ /**
+ * Initial transform for a rendering pass; transform from global device
+ * coordinates to the current RenderNode's drawing content coordinates,
+ * with the RenderNode's RenderProperty transforms already applied.
+ * Calling setMatrix(mBaseTransform) will result in drawing at the origin
+ * of the DisplayList's recorded surface prior to any Canvas
+ * transformation.
+ */
+ Matrix4 mBaseTransform;
+
friend class Layer;
friend class TextDrawFunctor;
friend class DrawBitmapOp;