summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-01-23 16:36:11 -0800
committerRomain Guy <romainguy@google.com>2011-01-23 16:36:11 -0800
commita566b7c3aada08d37cf08096c972e3e641bed773 (patch)
tree47ad89183050d1689f72ec701cb172ea2a794aeb /libs/hwui
parent8b2f5267f16c295f12faab810527cd6311997e34 (diff)
downloadframeworks_base-a566b7c3aada08d37cf08096c972e3e641bed773.zip
frameworks_base-a566b7c3aada08d37cf08096c972e3e641bed773.tar.gz
frameworks_base-a566b7c3aada08d37cf08096c972e3e641bed773.tar.bz2
Fix bitmap meshes to work in display lists.
Change-Id: Ie226d049840942d9ad9cf58e0c19132f49d62a75
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/DisplayListRenderer.cpp1
-rw-r--r--libs/hwui/OpenGLRenderer.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index 200e248..ffd3be4 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -325,6 +325,7 @@ void DisplayList::replay(OpenGLRenderer& renderer, uint32_t level) {
renderer.drawBitmapMesh(bitmap, meshWidth, meshHeight, vertices, colors, getPaint());
}
+ break;
case DrawPatch: {
int32_t* xDivs = NULL;
int32_t* yDivs = NULL;
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 2467d8e..e8dc9f6 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1094,10 +1094,10 @@ void OpenGLRenderer::drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHei
SkXfermode::Mode mode;
getAlphaAndMode(paint, &alpha, &mode);
- // TODO: Support the colors array
const uint32_t count = meshWidth * meshHeight * 6;
- TextureVertex mesh[count];
+ // TODO: Support the colors array
+ TextureVertex mesh[count];
TextureVertex* vertex = mesh;
for (int32_t y = 0; y < meshHeight; y++) {
for (int32_t x = 0; x < meshWidth; x++) {