Loading libs/hwui/OpenGLRenderer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -1982,9 +1982,8 @@ void OpenGLRenderer::getAlphaAndMode(SkPaint* paint, int* alpha, SkXfermode::Mod } SkXfermode::Mode OpenGLRenderer::getXfermode(SkXfermode* mode) { /* In the future we should look at unifying the Porter-Duff modes and * SkXferModes so that we can use SkXfermode::IsMode(xfer, &mode). */ // In the future we should look at unifying the Porter-Duff modes and // SkXferModes so that we can use SkXfermode::IsMode(xfer, &mode). if (mode == NULL) { return SkXfermode::kSrcOver_Mode; } Loading libs/hwui/TextDropShadowCache.h +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ struct ShadowText { SkTypeface* typeface; String8 str; // TODO: Should take into account fake bold and text skew bool operator<(const ShadowText& rhs) const { LTE_INT(len) { LTE_INT(radius) { Loading libs/hwui/TextureCache.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -209,13 +209,10 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege // decoding happened texture->blend = !bitmap->isOpaque(); break; case SkBitmap::kIndex8_Config: uploadLoFiTexture(resize, bitmap, texture->width, texture->height); texture->blend = false; break; case SkBitmap::kARGB_4444_Config: case SkBitmap::kIndex8_Config: uploadLoFiTexture(resize, bitmap, texture->width, texture->height); texture->blend = true; texture->blend = !bitmap->isOpaque(); break; default: LOGW("Unsupported bitmap config: %d", bitmap->getConfig()); Loading @@ -235,6 +232,7 @@ void TextureCache::uploadLoFiTexture(bool resize, SkBitmap* bitmap, rgbaBitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height); rgbaBitmap.allocPixels(); rgbaBitmap.eraseColor(0); rgbaBitmap.setIsOpaque(bitmap->isOpaque()); SkCanvas canvas(rgbaBitmap); canvas.drawBitmap(*bitmap, 0.0f, 0.0f, NULL); Loading Loading
libs/hwui/OpenGLRenderer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -1982,9 +1982,8 @@ void OpenGLRenderer::getAlphaAndMode(SkPaint* paint, int* alpha, SkXfermode::Mod } SkXfermode::Mode OpenGLRenderer::getXfermode(SkXfermode* mode) { /* In the future we should look at unifying the Porter-Duff modes and * SkXferModes so that we can use SkXfermode::IsMode(xfer, &mode). */ // In the future we should look at unifying the Porter-Duff modes and // SkXferModes so that we can use SkXfermode::IsMode(xfer, &mode). if (mode == NULL) { return SkXfermode::kSrcOver_Mode; } Loading
libs/hwui/TextDropShadowCache.h +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ struct ShadowText { SkTypeface* typeface; String8 str; // TODO: Should take into account fake bold and text skew bool operator<(const ShadowText& rhs) const { LTE_INT(len) { LTE_INT(radius) { Loading
libs/hwui/TextureCache.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -209,13 +209,10 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege // decoding happened texture->blend = !bitmap->isOpaque(); break; case SkBitmap::kIndex8_Config: uploadLoFiTexture(resize, bitmap, texture->width, texture->height); texture->blend = false; break; case SkBitmap::kARGB_4444_Config: case SkBitmap::kIndex8_Config: uploadLoFiTexture(resize, bitmap, texture->width, texture->height); texture->blend = true; texture->blend = !bitmap->isOpaque(); break; default: LOGW("Unsupported bitmap config: %d", bitmap->getConfig()); Loading @@ -235,6 +232,7 @@ void TextureCache::uploadLoFiTexture(bool resize, SkBitmap* bitmap, rgbaBitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height); rgbaBitmap.allocPixels(); rgbaBitmap.eraseColor(0); rgbaBitmap.setIsOpaque(bitmap->isOpaque()); SkCanvas canvas(rgbaBitmap); canvas.drawBitmap(*bitmap, 0.0f, 0.0f, NULL); Loading