From 2de7771740ee08fcaff638ec6b2e460bb72fff04 Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 20 Jan 2016 11:09:53 -0800 Subject: Normalize GL_UNPACK_ALIGNMENT Several places were setting GL_UNPACK_ALIGNMENT unneccessarily, whereas other places were assuming an unpack alignment of 1. Since we never actually do explicit row-alignment, set GL_UNPACK_ALIGNMENT to 1 at context creation time and never change it Bug: 26584230 Also turns on aggressive glGetError checking to better catch potential problem zones Change-Id: I190c8f0f0494a7f046d5ed769405c75d363be59a --- libs/hwui/GradientCache.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'libs/hwui/GradientCache.cpp') diff --git a/libs/hwui/GradientCache.cpp b/libs/hwui/GradientCache.cpp index 1473bc88c060..e899ac71ff36 100644 --- a/libs/hwui/GradientCache.cpp +++ b/libs/hwui/GradientCache.cpp @@ -273,8 +273,6 @@ void GradientCache::generateTexture(uint32_t* colors, float* positions, memcpy(pixels + rowBytes, pixels, rowBytes); - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); - if (mUseFloatTexture) { // We have to use GL_RGBA16F because GL_RGBA32F does not support filtering texture->upload(GL_RGBA16F, width, height, GL_RGBA, GL_FLOAT, pixels); -- cgit v1.2.3-59-g8ed1b