diff options
| author | 2011-10-28 14:32:20 -0700 | |
|---|---|---|
| committer | 2011-10-28 14:32:20 -0700 | |
| commit | e707859415f4c8e1c01228dfaa58fb0a690d442e (patch) | |
| tree | 880dfbda361e41286f0cda9789889a7b64c9a106 /libs/hwui/OpenGLRenderer.cpp | |
| parent | ee5954a8fe890a373f6e651c50ca5a2c53dac756 (diff) | |
Load identity matrix when calling Canvas.setMatrix(null)
Bug #5446826
Change-Id: I3a7817f266b17e9abe948500816d629edd9a2822
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
| -rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 32595e4a55ae..ce424ac341d1 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -939,7 +939,11 @@ void OpenGLRenderer::skew(float sx, float sy) { } void OpenGLRenderer::setMatrix(SkMatrix* matrix) { - mSnapshot->transform->load(*matrix); + if (matrix) { + mSnapshot->transform->load(*matrix); + } else { + mSnapshot->transform->loadIdentity(); + } } void OpenGLRenderer::getMatrix(SkMatrix* matrix) { |