summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorTom Hudson <tomhudson@google.com>2015-04-17 12:02:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-17 12:02:48 +0000
commit9543c0be95208f531fac2761bfce2d566c78c209 (patch)
treeee7aa2ada969fd55e0482a048ed623642c540627 /libs/hwui
parent103d48ec09cbaeedf28b66425cde9198f767e0d5 (diff)
parent040b6d8baf595865242790186672812f1df55cbb (diff)
downloadframeworks_base-9543c0be95208f531fac2761bfce2d566c78c209.zip
frameworks_base-9543c0be95208f531fac2761bfce2d566c78c209.tar.gz
frameworks_base-9543c0be95208f531fac2761bfce2d566c78c209.tar.bz2
Merge "Fix offset of composeLayerRegion"
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index aa722d0..d06534e 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1009,12 +1009,13 @@ void OpenGLRenderer::composeLayerRegion(Layer* layer, const Rect& rect) {
TextureVertex::set(mesh++, r->left, r->bottom, u1, v2);
TextureVertex::set(mesh++, r->right, r->bottom, u2, v2);
}
+ Rect modelRect = Rect(rect.getWidth(), rect.getHeight());
Glop glop;
GlopBuilder(mRenderState, mCaches, &glop)
.setMeshTexturedIndexedQuads(&quadVertices[0], count * 6)
.setFillLayer(layer->getTexture(), layer->getColorFilter(), getLayerAlpha(layer), layer->getMode(), Blend::ModeOrderSwap::NoSwap)
.setTransform(currentSnapshot()->getOrthoMatrix(), *currentTransform(), false)
- .setModelViewOffsetRectSnap(0, 0, rect)
+ .setModelViewOffsetRectSnap(rect.left, rect.top, modelRect)
.setRoundRectClipState(currentSnapshot()->roundRectClipState)
.build();
DRAW_DOUBLE_STENCIL_IF(!layer->hasDrawnSinceUpdate, renderGlop(glop));