diff options
author | Chris Craik <ccraik@google.com> | 2012-09-06 16:44:51 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-09-06 16:44:51 -0700 |
commit | 9147cd4ac56d53dec6da1ef13dd04ba1eec1a7df (patch) | |
tree | b2b281f65745e56c0f3db9abb6b75be001efa12e /libs | |
parent | fb3ec448f1208d75edebff0e93fa97a8913ff29e (diff) | |
download | frameworks_base-9147cd4ac56d53dec6da1ef13dd04ba1eec1a7df.zip frameworks_base-9147cd4ac56d53dec6da1ef13dd04ba1eec1a7df.tar.gz frameworks_base-9147cd4ac56d53dec6da1ef13dd04ba1eec1a7df.tar.bz2 |
Fix m11 to be Y scale instead of X
bug:7114630
Fixes different X and Y values resulting in blurry lines/rects.
Change-Id: I3eb244e0cf769efa6b38d08741cf37d0bf62b786
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index a1bb6a2..b66c898 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -1760,7 +1760,7 @@ void OpenGLRenderer::drawAARect(float left, float top, float right, float bottom float m00 = mat->data[Matrix4::kScaleX]; float m01 = mat->data[Matrix4::kSkewY]; float m10 = mat->data[Matrix4::kSkewX]; - float m11 = mat->data[Matrix4::kScaleX]; + float m11 = mat->data[Matrix4::kScaleY]; float scaleX = sqrt(m00 * m00 + m01 * m01); float scaleY = sqrt(m10 * m10 + m11 * m11); inverseScaleX = (scaleX != 0) ? (inverseScaleX / scaleX) : 0; @@ -1896,7 +1896,7 @@ status_t OpenGLRenderer::drawLines(float* points, int count, SkPaint* paint) { float m00 = mat->data[Matrix4::kScaleX]; float m01 = mat->data[Matrix4::kSkewY]; float m10 = mat->data[Matrix4::kSkewX]; - float m11 = mat->data[Matrix4::kScaleX]; + float m11 = mat->data[Matrix4::kScaleY]; float scaleX = sqrtf(m00 * m00 + m01 * m01); float scaleY = sqrtf(m10 * m10 + m11 * m11); |