summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp9
1 files changed, 6 insertions, 3 deletions
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());
}