diff options
author | Xin Li <delphij@google.com> | 2017-11-14 12:31:11 -0800 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2017-11-14 12:31:11 -0800 |
commit | 220871a697290529278ed16db508eda8e12f3fc7 (patch) | |
tree | bc13101b63c6fe39a9d92706ecb7ded7f98f5a9c /libs/hwui/Texture.cpp | |
parent | 802f191b2b84a1b1b82c7f6f3268846084b35dfb (diff) | |
parent | 98e12851336b7db16e583f9afac63ecc97465980 (diff) |
Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.
Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
Diffstat (limited to 'libs/hwui/Texture.cpp')
-rw-r--r-- | libs/hwui/Texture.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libs/hwui/Texture.cpp b/libs/hwui/Texture.cpp index 4ef31d59271e..b7c1e290370f 100644 --- a/libs/hwui/Texture.cpp +++ b/libs/hwui/Texture.cpp @@ -217,9 +217,8 @@ void Texture::colorTypeToGlFormatAndType(const Caches& caches, SkColorType color *outType = GL_UNSIGNED_SHORT_5_6_5; } break; - // ARGB_4444 and Index_8 are both upconverted to RGBA_8888 + // ARGB_4444 is upconverted to RGBA_8888 case kARGB_4444_SkColorType: - case kIndex_8_SkColorType: case kN32_SkColorType: *outFormat = GL_RGBA; *outInternalFormat = caches.rgbaInternalFormat(needSRGB); @@ -270,7 +269,6 @@ SkBitmap Texture::uploadToN32(const SkBitmap& bitmap, bool hasLinearBlending, bool Texture::hasUnsupportedColorType(const SkImageInfo& info, bool hasLinearBlending) { return info.colorType() == kARGB_4444_SkColorType - || info.colorType() == kIndex_8_SkColorType || (info.colorType() == kRGB_565_SkColorType && hasLinearBlending && info.colorSpace()->isSRGB()) @@ -279,11 +277,6 @@ bool Texture::hasUnsupportedColorType(const SkImageInfo& info, bool hasLinearBle } void Texture::upload(Bitmap& bitmap) { - if (!bitmap.readyToDraw()) { - ALOGE("Cannot generate texture from bitmap"); - return; - } - ATRACE_FORMAT("Upload %ux%u Texture", bitmap.width(), bitmap.height()); // We could also enable mipmapping if both bitmap dimensions are powers |