diff options
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 |
commit | ac7b6d33d23cb0baaf61c723346198d41f012035 (patch) | |
tree | 9302223ad4dd2337f6e6b4524fe83032532c20a4 /libs/hwui/OpenGLRenderer.cpp | |
parent | 937edac8e8583023019b625dd426ebf65169e30d (diff) | |
download | frameworks_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/OpenGLRenderer.cpp')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 87ed84f..0c42b92 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -2148,6 +2148,7 @@ void OpenGLRenderer::restoreToCount(int saveCount) { mState.restoreToCount(saveCount); } + void OpenGLRenderer::translate(float dx, float dy, float dz) { mState.translate(dx, dy, dz); } @@ -2168,6 +2169,11 @@ void OpenGLRenderer::setMatrix(const Matrix4& matrix) { mState.setMatrix(matrix); } +void OpenGLRenderer::setLocalMatrix(const SkMatrix& matrix) { + mState.setMatrix(mBaseTransform); + mState.concatMatrix(matrix); +} + void OpenGLRenderer::concatMatrix(const Matrix4& matrix) { mState.concatMatrix(matrix); } |