diff options
| author | Romain Guy <romainguy@google.com> | 2010-10-08 18:36:15 -0700 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2010-10-08 18:36:57 -0700 |
| commit | 2728f961614a385df1f056fc24803a9f65c90fab (patch) | |
| tree | c09ff5c42f949f4b9e76e197108cc5a506113ca3 /libs/hwui/OpenGLRenderer.cpp | |
| parent | 8550c4c7b5952b7a4e1e0ede95c9492d03099a13 (diff) | |
| download | frameworks_base-2728f961614a385df1f056fc24803a9f65c90fab.zip frameworks_base-2728f961614a385df1f056fc24803a9f65c90fab.tar.gz frameworks_base-2728f961614a385df1f056fc24803a9f65c90fab.tar.bz2 | |
Don't update 9patches on every frame.
Change-Id: I7ffb2365f83e0453e7d0a0cdcb3fc9308b305238
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
| -rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 62c590d..5b226b4 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -692,9 +692,8 @@ void OpenGLRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int SkXfermode::Mode mode; getAlphaAndMode(paint, &alpha, &mode); - Patch* mesh = mCaches.patchCache.get(width, height); - mesh->updateVertices(bitmap->width(), bitmap->height(),left, top, right, bottom, - xDivs, yDivs, width, height); + const Patch* mesh = mCaches.patchCache.get(bitmap->width(), bitmap->height(), + right - left, bottom - top, xDivs, yDivs, width, height); // Specify right and bottom as +1.0f from left/top to prevent scaling since the // patch mesh already defines the final size |
