diff options
author | 2011-04-27 14:21:41 -0700 | |
---|---|---|
committer | 2011-04-27 14:21:41 -0700 | |
commit | 9fc27819d75e24ad63d7b383d80f5cb66a577a0d (patch) | |
tree | a5d490bc034404c4a2ddcba95c4fdbfd0d01d6db /libs/hwui/LayerRenderer.cpp | |
parent | 2d039219adbeaad1a481267bca021b1a8645b481 (diff) |
Correctly compute tex coords for rect layers.
Bug #4192695
This change also fixes Javadoc links in the framework.
Change-Id: Ia548bcb18baba5d6fe6a4a04a2278e3a3bd465b2
Diffstat (limited to 'libs/hwui/LayerRenderer.cpp')
-rw-r--r-- | libs/hwui/LayerRenderer.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp index ba110ec0efae..ca1e7ae0027b 100644 --- a/libs/hwui/LayerRenderer.cpp +++ b/libs/hwui/LayerRenderer.cpp @@ -102,19 +102,7 @@ void LayerRenderer::generateMesh() { mLayer->meshElementCount = 0; } - const android::Rect& bounds = mLayer->region.getBounds(); - mLayer->regionRect.set(bounds.leftTop().x, bounds.leftTop().y, - bounds.rightBottom().x, bounds.rightBottom().y); - - const float texX = 1.0f / float(mLayer->width); - const float texY = 1.0f / float(mLayer->height); - const float height = mLayer->layer.getHeight(); - mLayer->texCoords.set( - mLayer->regionRect.left * texX, - (height - mLayer->regionRect.top) * texY, - mLayer->regionRect.right * texX, - (height - mLayer->regionRect.bottom) * texY); - + mLayer->setRegionAsRect(); return; } |