summaryrefslogtreecommitdiff
path: root/libs/hwui/Texture.cpp
diff options
context:
space:
mode:
author Leon Scroggins III <scroggo@google.com> 2017-07-12 10:46:35 -0400
committer Leon Scroggins III <scroggo@google.com> 2017-07-12 11:27:19 -0400
commitf51a80d2b074d1971b11b19e890c936af5aa57a3 (patch)
treed45f2acf4d6b458ae3c38fdb18064909acc09c07 /libs/hwui/Texture.cpp
parent5b3d97a8ab5a9c0b13cacb621dcb4f999623dec7 (diff)
Remove more references to kIndex_8
Test: Covered by existing tests. No actual change in behavior, since kIndex_8 is not being used anyway. Bug: 62483967 Change-Id: I317e3a814dbd102925fe412d2e19111b0af3af38
Diffstat (limited to 'libs/hwui/Texture.cpp')
-rw-r--r--libs/hwui/Texture.cpp9
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