diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/Matrix.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp index 5502e66..1a0fcf4 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -87,7 +87,7 @@ void Matrix4::load(const SkMatrix& v) { data[kScaleZ] = 1.0f; - mSimpleMatrix = (v.getType() <= SkMatrix::kScale_Mask); + mSimpleMatrix = (v.getType() <= (SkMatrix::kScale_Mask | SkMatrix::kTranslate_Mask)); } void Matrix4::copyTo(SkMatrix& v) const { diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 81fa1ea..0a95408 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -597,8 +597,10 @@ void OpenGLRenderer::getMatrix(SkMatrix* matrix) { } void OpenGLRenderer::concatMatrix(SkMatrix* matrix) { - mat4 m(*matrix); - mSnapshot->transform->multiply(m); + SkMatrix transform; + mSnapshot->transform->copyTo(transform); + transform.preConcat(*matrix); + mSnapshot->transform->load(transform); } /////////////////////////////////////////////////////////////////////////////// @@ -606,7 +608,8 @@ void OpenGLRenderer::concatMatrix(SkMatrix* matrix) { /////////////////////////////////////////////////////////////////////////////// void OpenGLRenderer::setScissorFromClip() { - const Rect& clip = *mSnapshot->clipRect; + Rect clip(*mSnapshot->clipRect); + clip.snapToPixelBoundaries(); glScissor(clip.left, mSnapshot->height - clip.bottom, clip.getWidth(), clip.getHeight()); } |