diff options
author | Tom Hudson <tomhudson@google.com> | 2015-04-17 12:02:47 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-17 12:02:48 +0000 |
commit | 9543c0be95208f531fac2761bfce2d566c78c209 (patch) | |
tree | ee7aa2ada969fd55e0482a048ed623642c540627 /libs/hwui | |
parent | 103d48ec09cbaeedf28b66425cde9198f767e0d5 (diff) | |
parent | 040b6d8baf595865242790186672812f1df55cbb (diff) | |
download | frameworks_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.cpp | 3 |
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)); |