From ac7b6d33d23cb0baaf61c723346198d41f012035 Mon Sep 17 00:00:00 2001 From: Tom Hudson Date: Tue, 30 Jun 2015 11:26:13 -0400 Subject: New setLocalMatrix() operation for HWUI Concats any matrix passed through from DisplayListCanvas with the initialTransform of the containing RenderNode. BUG:22189925 Change-Id: I5ea54a6e2a29520c79a8860bde7682694e8595d2 --- libs/hwui/OpenGLRenderer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/hwui/OpenGLRenderer.cpp') diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 87ed84f510ca..0c42b92058cc 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); } -- cgit v1.2.3-59-g8ed1b