summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-09-07 18:44:39 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-07 18:44:40 -0700
commit4aacf93d40b4be82aa35bf164d6fd6536c8b2a50 (patch)
treedaa3d1fab2d9688f1d8f8aa06064b2f99cce0b42 /libs
parent4ea283a05f3724285ed3057ff1de1a344ab3e15a (diff)
parente49d7ec36132f33b7c9e2c044ab9dd3585aa3747 (diff)
downloadframeworks_base-4aacf93d40b4be82aa35bf164d6fd6536c8b2a50.zip
frameworks_base-4aacf93d40b4be82aa35bf164d6fd6536c8b2a50.tar.gz
frameworks_base-4aacf93d40b4be82aa35bf164d6fd6536c8b2a50.tar.bz2
Merge "Fix memory corruption in LayerRenderer::copyLayer" into jb-mr1-dev
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/LayerRenderer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index f81640b..5a8f2b7 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -400,6 +400,8 @@ bool LayerRenderer::copyLayer(Layer* layer, SkBitmap* bitmap) {
caches.activeTexture(0);
glBindTexture(GL_TEXTURE_2D, texture);
+ glPixelStorei(GL_PACK_ALIGNMENT, bitmap->bytesPerPixel());
+
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);