Loading graphics/java/android/graphics/BitmapFactory.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -69,8 +69,11 @@ public class BitmapFactory { * the decoder will try to pick the best matching config based on the * the decoder will try to pick the best matching config based on the * system's screen depth, and characteristics of the original image such * system's screen depth, and characteristics of the original image such * as if it has per-pixel alpha (requiring a config that also does). * as if it has per-pixel alpha (requiring a config that also does). * * The configuration is set to {@link android.graphics.Bitmap.Config#ARGB_8888} * by default. */ */ public Bitmap.Config inPreferredConfig; public Bitmap.Config inPreferredConfig = Bitmap.Config.ARGB_8888; /** /** * If dither is true, the decoder will attempt to dither the decoded * If dither is true, the decoder will attempt to dither the decoded Loading libs/hwui/TextureCache.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -133,7 +133,7 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege GL_RGB, GL_UNSIGNED_SHORT_5_6_5, bitmap->getPixels()); GL_RGB, GL_UNSIGNED_SHORT_5_6_5, bitmap->getPixels()); break; break; case SkBitmap::kARGB_8888_Config: case SkBitmap::kARGB_8888_Config: texture->blend = true; texture->blend = !bitmap->isOpaque(); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bitmap->rowBytesAsPixels(), texture->height, 0, glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bitmap->rowBytesAsPixels(), texture->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, bitmap->getPixels()); GL_RGBA, GL_UNSIGNED_BYTE, bitmap->getPixels()); break; break; Loading Loading
graphics/java/android/graphics/BitmapFactory.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -69,8 +69,11 @@ public class BitmapFactory { * the decoder will try to pick the best matching config based on the * the decoder will try to pick the best matching config based on the * system's screen depth, and characteristics of the original image such * system's screen depth, and characteristics of the original image such * as if it has per-pixel alpha (requiring a config that also does). * as if it has per-pixel alpha (requiring a config that also does). * * The configuration is set to {@link android.graphics.Bitmap.Config#ARGB_8888} * by default. */ */ public Bitmap.Config inPreferredConfig; public Bitmap.Config inPreferredConfig = Bitmap.Config.ARGB_8888; /** /** * If dither is true, the decoder will attempt to dither the decoded * If dither is true, the decoder will attempt to dither the decoded Loading
libs/hwui/TextureCache.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -133,7 +133,7 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege GL_RGB, GL_UNSIGNED_SHORT_5_6_5, bitmap->getPixels()); GL_RGB, GL_UNSIGNED_SHORT_5_6_5, bitmap->getPixels()); break; break; case SkBitmap::kARGB_8888_Config: case SkBitmap::kARGB_8888_Config: texture->blend = true; texture->blend = !bitmap->isOpaque(); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bitmap->rowBytesAsPixels(), texture->height, 0, glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bitmap->rowBytesAsPixels(), texture->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, bitmap->getPixels()); GL_RGBA, GL_UNSIGNED_BYTE, bitmap->getPixels()); break; break; Loading