diff options
author | Chris Craik <ccraik@google.com> | 2014-04-11 22:46:07 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-11 22:46:07 +0000 |
commit | dd35634cb0059b4b745161eb80234d8e8da38033 (patch) | |
tree | 48f30a6efc6762b55bae023cefb76ce2e502853e /libs | |
parent | 296832e0e5ac007aecd5824dede840d1f403ced0 (diff) | |
parent | 0664fef9e2a36025b3fad85b57b4d10617b4d66e (diff) | |
download | frameworks_base-dd35634cb0059b4b745161eb80234d8e8da38033.zip frameworks_base-dd35634cb0059b4b745161eb80234d8e8da38033.tar.gz frameworks_base-dd35634cb0059b4b745161eb80234d8e8da38033.tar.bz2 |
Merge "Fix BitmapMesh buffer copy"
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/DisplayListRenderer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index 140a07a..6c73d68 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -258,11 +258,11 @@ status_t DisplayListRenderer::drawBitmapData(const SkBitmap* bitmap, float left, status_t DisplayListRenderer::drawBitmapMesh(const SkBitmap* bitmap, int meshWidth, int meshHeight, const float* vertices, const int* colors, const SkPaint* paint) { - int count = (meshWidth + 1) * (meshHeight + 1) * 2; + int vertexCount = (meshWidth + 1) * (meshHeight + 1); bitmap = refBitmap(bitmap); - vertices = refBuffer<float>(vertices, count); + vertices = refBuffer<float>(vertices, vertexCount * 2); // 2 floats per vertex paint = refPaint(paint); - colors = refBuffer<int>(colors, count); + colors = refBuffer<int>(colors, vertexCount); // 1 color per vertex addDrawOp(new (alloc()) DrawBitmapMeshOp(bitmap, meshWidth, meshHeight, vertices, colors, paint)); |