aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2017-07-05 11:39:27 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-05 17:49:10 +0000
commitbace7a940a6d83051eaa98b73dfa8867ed16ac2e (patch)
tree9b9030db3336e7432d6d0ed6db61ef388492b2ef
parent1d2678f8ca5f48b3461c06f125372320ca905acc (diff)
Remove CodecSrc::kIndex8_Always_DstColorType
We have removed support for drawing Index8, so stop testing it in DM. Bug: skia: 6828 Change-Id: Ib2c4d3ebd371be704151a9f956c0ca2aaf2926a6 Reviewed-on: https://skia-review.googlesource.com/21525 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
-rw-r--r--dm/DM.cpp26
-rw-r--r--dm/DMSrcSink.cpp9
-rw-r--r--dm/DMSrcSink.h1
3 files changed, 4 insertions, 32 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index dbcf4cb454..18645a16f0 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -414,9 +414,6 @@ static void push_codec_src(Path path, CodecSrc::Mode mode, CodecSrc::DstColorTyp
case CodecSrc::kGrayscale_Always_DstColorType:
folder.append("_kGray8");
break;
- case CodecSrc::kIndex8_Always_DstColorType:
- folder.append("_kIndex8");
- break;
case CodecSrc::kNonNative8888_Always_DstColorType:
folder.append("_kNonNative");
break;
@@ -452,9 +449,6 @@ static void push_android_codec_src(Path path, CodecSrc::DstColorType dstColorTyp
case CodecSrc::kGrayscale_Always_DstColorType:
folder.append("_kGray8");
break;
- case CodecSrc::kIndex8_Always_DstColorType:
- folder.append("_kIndex8");
- break;
case CodecSrc::kNonNative8888_Always_DstColorType:
folder.append("_kNonNative");
break;
@@ -557,12 +551,6 @@ static void push_codec_srcs(Path path) {
switch (codec->getInfo().colorType()) {
case kGray_8_SkColorType:
colorTypes.push_back(CodecSrc::kGrayscale_Always_DstColorType);
- if (SkEncodedImageFormat::kWBMP == codec->getEncodedFormat()) {
- colorTypes.push_back(CodecSrc::kIndex8_Always_DstColorType);
- }
- break;
- case kIndex_8_SkColorType:
- colorTypes.push_back(CodecSrc::kIndex8_Always_DstColorType);
break;
default:
break;
@@ -687,9 +675,6 @@ static void push_brd_src(Path path, CodecSrc::DstColorType dstColorType, BRDSrc:
switch (dstColorType) {
case CodecSrc::kGetFromCanvas_DstColorType:
break;
- case CodecSrc::kIndex8_Always_DstColorType:
- folder.append("_kIndex");
- break;
case CodecSrc::kGrayscale_Always_DstColorType:
folder.append("_kGray");
break;
@@ -707,14 +692,11 @@ static void push_brd_src(Path path, CodecSrc::DstColorType dstColorType, BRDSrc:
}
static void push_brd_srcs(Path path) {
- // Only run Index8 and grayscale to one sampleSize and Mode. Though interesting
- // to test these color types, they should not reveal anything across various
+ // Only run grayscale to one sampleSize and Mode. Though interesting
+ // to test grayscale, it should not reveal anything across various
// sampleSizes and Modes
- for (auto type : { CodecSrc::kIndex8_Always_DstColorType,
- CodecSrc::kGrayscale_Always_DstColorType }) {
- // Arbitrarily choose Mode and sampleSize.
- push_brd_src(path, type, BRDSrc::kFullImage_Mode, 2);
- }
+ // Arbitrarily choose Mode and sampleSize.
+ push_brd_src(path, CodecSrc::kGrayscale_Always_DstColorType, BRDSrc::kFullImage_Mode, 2);
// Test on a variety of sampleSizes, making sure to include:
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 6e95b53386..bceb703cda 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -139,9 +139,6 @@ Error BRDSrc::draw(SkCanvas* canvas) const {
switch (fDstColorType) {
case CodecSrc::kGetFromCanvas_DstColorType:
break;
- case CodecSrc::kIndex8_Always_DstColorType:
- colorType = kIndex_8_SkColorType;
- break;
case CodecSrc::kGrayscale_Always_DstColorType:
colorType = kGray_8_SkColorType;
break;
@@ -365,12 +362,6 @@ static void premultiply_if_necessary(SkBitmap& bitmap) {
static bool get_decode_info(SkImageInfo* decodeInfo, SkColorType canvasColorType,
CodecSrc::DstColorType dstColorType, SkAlphaType dstAlphaType) {
switch (dstColorType) {
- case CodecSrc::kIndex8_Always_DstColorType:
- if (kRGB_565_SkColorType == canvasColorType) {
- return false;
- }
- *decodeInfo = decodeInfo->makeColorType(kIndex_8_SkColorType);
- break;
case CodecSrc::kGrayscale_Always_DstColorType:
if (kRGB_565_SkColorType == canvasColorType) {
return false;
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index d72d86814b..553eac03c2 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -127,7 +127,6 @@ public:
};
enum DstColorType {
kGetFromCanvas_DstColorType,
- kIndex8_Always_DstColorType,
kGrayscale_Always_DstColorType,
kNonNative8888_Always_DstColorType,
};