aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-07-17 10:13:58 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-17 20:37:28 +0000
commit262b319dcdbf6329d5ca3212b22323ebec7a7b49 (patch)
treeb10f16da65b12d577c37981bee52be6316e05024 /include
parent4d7a9bf0c0ec32394fb5923e01f816ca5ff29cd4 (diff)
Index8 is dead, remove guarded code
Needs google3 to be updated before this can land. Bug: skia:6828 Change-Id: I2c16be13c6937ffa48768cc24f9f980171c824d6 Reviewed-on: https://skia-review.googlesource.com/23940 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkBitmap.h20
-rw-r--r--include/core/SkImageInfo.h9
-rw-r--r--include/core/SkPixmap.h9
3 files changed, 1 insertions, 37 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 10d1c251bd..bcb77f6278 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -121,11 +121,6 @@ public:
/** Return true iff drawing this bitmap has no effect.
*/
bool drawsNothing() const {
-#ifdef SK_SUPPORT_LEGACY_INDEX_8_COLORTYPE
- if (this->colorType() == kIndex_8_SkColorType) {
- return true;
- }
-#endif
return this->empty() || this->isNull();
}
@@ -429,11 +424,6 @@ public:
non-null colortable. Returns true if all of the above are met.
*/
bool readyToDraw() const {
-#ifdef SK_SUPPORT_LEGACY_INDEX_8_COLORTYPE
- if (this->colorType() == kIndex_8_SkColorType) {
- return false;
- }
-#endif
return this->getPixels() != NULL;
}
@@ -734,14 +724,4 @@ inline uint8_t* SkBitmap::getAddr8(int x, int y) const {
return (uint8_t*)fPixels + y * fRowBytes + x;
}
-#ifdef SK_SUPPORT_LEGACY_INDEX_8_COLORTYPE
-inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const {
- SkASSERT(fPixels);
- SkASSERT(kIndex_8_SkColorType == this->colorType());
- SkASSERT((unsigned)x < (unsigned)this->width() && (unsigned)y < (unsigned)this->height());
- SkASSERT(this->getColorTable());
- return (*this->getColorTable())[*((const uint8_t*)fPixels + y * fRowBytes + x)];
-}
-#endif
-
#endif
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h
index 551eb86988..d3cbda3cf9 100644
--- a/include/core/SkImageInfo.h
+++ b/include/core/SkImageInfo.h
@@ -72,9 +72,6 @@ enum SkColorType {
kARGB_4444_SkColorType,
kRGBA_8888_SkColorType,
kBGRA_8888_SkColorType,
-#ifdef SK_SUPPORT_LEGACY_INDEX_8_COLORTYPE
- kIndex_8_SkColorType,
-#endif
kGray_8_SkColorType,
kRGBA_F16_SkColorType,
@@ -97,9 +94,6 @@ static int SkColorTypeBytesPerPixel(SkColorType ct) {
2, // ARGB_4444
4, // RGBA_8888
4, // BGRA_8888
-#ifdef SK_SUPPORT_LEGACY_INDEX_8_COLORTYPE
- 1, // kIndex_8
-#endif
1, // kGray_8
8, // kRGBA_F16
};
@@ -118,9 +112,6 @@ static int SkColorTypeShiftPerPixel(SkColorType ct) {
1, // ARGB_4444
2, // RGBA_8888
2, // BGRA_8888
-#ifdef SK_SUPPORT_LEGACY_INDEX_8_COLORTYPE
- 0, // kIndex_8
-#endif
0, // kGray_8
3, // kRGBA_F16
};
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
index be821ec470..9ad04c1fef 100644
--- a/include/core/SkPixmap.h
+++ b/include/core/SkPixmap.h
@@ -30,14 +30,7 @@ public:
SkColorTable* ctable = NULL)
: fPixels(addr), fCTable(ctable), fRowBytes(rowBytes), fInfo(info)
{
-#ifdef SK_SUPPORT_LEGACY_INDEX_8_COLORTYPE
- if (kIndex_8_SkColorType == info.colorType()) {
- SkASSERT(ctable);
- } else
-#endif
- {
- SkASSERT(NULL == ctable);
- }
+ SkASSERT(NULL == ctable);
}
void reset();