diff options
author | Romain Guy <romainguy@google.com> | 2011-03-15 16:32:28 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-03-15 16:32:28 -0700 |
commit | 6217a71cd281003a376d998269d577d26a61c206 (patch) | |
tree | 3fbaaf391a24d8d4f3c009accb4b9c911a939709 /libs/hwui/LayerRenderer.cpp | |
parent | ad37cd3b5d3de9dd0858af04fbccd102e8ff4b0e (diff) | |
download | frameworks_base-6217a71cd281003a376d998269d577d26a61c206.zip frameworks_base-6217a71cd281003a376d998269d577d26a61c206.tar.gz frameworks_base-6217a71cd281003a376d998269d577d26a61c206.tar.bz2 |
Fix performance issue in Launcher
Bug #3515248
The problem is caused by the fast path when compositing layers on screen.
The fast path draws a single quad using glDrawArrays() whereas the general
path draws an arbitrary mesh using glDrawElements(). It looks like there's
an issue in the driver since glDrawArrays() is significantly slower than
glDrawElements() for a quad (6 vertices!)
This change just gets rid of the fast path.
Change-Id: Ib2361253ec67f44a988270f76c183422f12ce537
Diffstat (limited to 'libs/hwui/LayerRenderer.cpp')
-rw-r--r-- | libs/hwui/LayerRenderer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp index b1eb164..f92e20b 100644 --- a/libs/hwui/LayerRenderer.cpp +++ b/libs/hwui/LayerRenderer.cpp @@ -92,7 +92,11 @@ Region* LayerRenderer::getRegion() { void LayerRenderer::generateMesh() { #if RENDER_LAYERS_AS_REGIONS +#if RENDER_LAYERS_RECT_AS_RECT if (mLayer->region.isRect() || mLayer->region.isEmpty()) { +#else + if (mLayer->region.isEmpty()) { +#endif if (mLayer->mesh) { delete mLayer->mesh; delete mLayer->meshIndices; |