diff options
author | Romain Guy <romainguy@google.com> | 2013-06-20 18:30:28 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2013-06-21 10:13:58 -0700 |
commit | 03c00b5a135e68d22ca5bb829b899ebda6ed7e9d (patch) | |
tree | 7538aa95ebbfb5c06aaaebbd22966cddcce2ee1e /libs/hwui/PatchCache.cpp | |
parent | d485ef27c795648c4a05c4c089e8c5a15712fd36 (diff) | |
download | frameworks_base-03c00b5a135e68d22ca5bb829b899ebda6ed7e9d.zip frameworks_base-03c00b5a135e68d22ca5bb829b899ebda6ed7e9d.tar.gz frameworks_base-03c00b5a135e68d22ca5bb829b899ebda6ed7e9d.tar.bz2 |
Batch 9-patches in a single mesh whenever possible
This change also fixes the way batched bitmaps were handled
inside a layer. The layer is now correctly dirtied to minimize
the amount of pixels to blend.
Fix alpha, mode and opaque computations for DrawPatchOp.
Change-Id: I1b6cd581c0f0db66c1002bb4fb1a9811e55bfa78
Diffstat (limited to 'libs/hwui/PatchCache.cpp')
-rw-r--r-- | libs/hwui/PatchCache.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/hwui/PatchCache.cpp b/libs/hwui/PatchCache.cpp index c23e991..dc69d7f 100644 --- a/libs/hwui/PatchCache.cpp +++ b/libs/hwui/PatchCache.cpp @@ -118,10 +118,10 @@ const Patch* PatchCache::get(const AssetAtlas::Entry* entry, if (entry) { vertices = newMesh->createMesh(bitmapWidth, bitmapHeight, - 0.0f, 0.0f, pixelWidth, pixelHeight, entry->uvMapper, patch); + pixelWidth, pixelHeight, entry->uvMapper, patch); } else { vertices = newMesh->createMesh(bitmapWidth, bitmapHeight, - 0.0f, 0.0f, pixelWidth, pixelHeight, patch); + pixelWidth, pixelHeight, patch); } if (vertices) { @@ -141,8 +141,6 @@ const Patch* PatchCache::get(const AssetAtlas::Entry* entry, mSize += size; glBufferSubData(GL_ARRAY_BUFFER, newMesh->offset, size, vertices); - - delete[] vertices; } mCache.put(description, newMesh); |