summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-10-15 14:00:16 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-15 14:00:17 -0700
commit10aca41e51934822dc492cb69b69cef37f42ad42 (patch)
treea9954fca3fd337929a7d768d48a1287b3332d090 /libs
parent97d88927f28226403ff7e5befe1a5486b5fc8725 (diff)
parente5ebcb0107a939395e03592fd44c746cd09e311d (diff)
downloadframeworks_base-10aca41e51934822dc492cb69b69cef37f42ad42.zip
frameworks_base-10aca41e51934822dc492cb69b69cef37f42ad42.tar.gz
frameworks_base-10aca41e51934822dc492cb69b69cef37f42ad42.tar.bz2
Merge "Fix clipping issue in StackView."
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/Matrix.cpp2
-rw-r--r--libs/hwui/OpenGLRenderer.cpp9
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());
}