diff options
author | Romain Guy <romainguy@google.com> | 2012-09-18 15:40:58 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2012-09-18 15:41:16 -0700 |
commit | 35643ddc689913f5b5f80ceed864470d987bd6cd (patch) | |
tree | db2ac0933bc52d1c71aa7d0edfd94c06dcc2cf2a /libs/hwui/Caches.cpp | |
parent | 29d0aa73a099fde05c506857b5d215cde87b78d6 (diff) | |
download | frameworks_base-35643ddc689913f5b5f80ceed864470d987bd6cd.zip frameworks_base-35643ddc689913f5b5f80ceed864470d987bd6cd.tar.gz frameworks_base-35643ddc689913f5b5f80ceed864470d987bd6cd.tar.bz2 |
Minimize state changes when updating layers
Change-Id: I407fcc80bd3178f9f09a3b379ceb7f7ce0749e08
Diffstat (limited to 'libs/hwui/Caches.cpp')
-rw-r--r-- | libs/hwui/Caches.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp index 1de0f9d..edb4c10 100644 --- a/libs/hwui/Caches.cpp +++ b/libs/hwui/Caches.cpp @@ -378,6 +378,9 @@ bool Caches::setScissor(GLint x, GLint y, GLint width, GLint height) { if (scissorEnabled && (x != mScissorX || y != mScissorY || width != mScissorWidth || height != mScissorHeight)) { + if (x < 0) x = 0; + if (y < 0) y = 0; + glScissor(x, y, width, height); mScissorX = x; |