Index: dm/DM.cpp |
diff --git a/dm/DM.cpp b/dm/DM.cpp |
index 4b32d2fc1a9549eb20d23f8eb2a2113ac8f339da..c4466180154e1e15631207a045a69b976c0b1933 100644 |
--- a/dm/DM.cpp |
+++ b/dm/DM.cpp |
@@ -348,6 +348,15 @@ static bool brd_color_type_supported(SkBitmapRegionDecoderInterface::Strategy st |
default: |
return false; |
} |
+ case SkBitmapRegionDecoderInterface::kCodec_Strategy: |
+ switch (dstColorType) { |
+ case CodecSrc::kGetFromCanvas_DstColorType: |
+ case CodecSrc::kIndex8_Always_DstColorType: |
+ case CodecSrc::kGrayscale_Always_DstColorType: |
+ return true; |
+ default: |
+ return false; |
+ } |
default: |
SkASSERT(false); |
return false; |
@@ -364,6 +373,9 @@ static void push_brd_src(Path path, SkBitmapRegionDecoderInterface::Strategy str |
case SkBitmapRegionDecoderInterface::kOriginal_Strategy: |
folder.append("brd_sample"); |
break; |
+ case SkBitmapRegionDecoderInterface::kCodec_Strategy: |
+ folder.append("brd_codec"); |
+ break; |
default: |
SkASSERT(false); |
return; |
@@ -406,7 +418,8 @@ static void push_brd_srcs(Path path) { |
const SkBitmapRegionDecoderInterface::Strategy strategies[] = { |
SkBitmapRegionDecoderInterface::kCanvas_Strategy, |
- SkBitmapRegionDecoderInterface::kOriginal_Strategy |
+ SkBitmapRegionDecoderInterface::kOriginal_Strategy, |
+ SkBitmapRegionDecoderInterface::kCodec_Strategy, |
}; |
const uint32_t sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; |
@@ -414,14 +427,14 @@ static void push_brd_srcs(Path path) { |
// We will only test to one backend (8888), but we will test all of the |
// color types that we need to decode to on this backend. |
const CodecSrc::DstColorType dstColorTypes[] = { |
- CodecSrc::kGetFromCanvas_DstColorType, |
- CodecSrc::kIndex8_Always_DstColorType, |
- CodecSrc::kGrayscale_Always_DstColorType, |
+ CodecSrc::kGetFromCanvas_DstColorType, |
+ CodecSrc::kIndex8_Always_DstColorType, |
+ CodecSrc::kGrayscale_Always_DstColorType, |
}; |
const BRDSrc::Mode modes[] = { |
- BRDSrc::kFullImage_Mode, |
- BRDSrc::kDivisor_Mode |
+ BRDSrc::kFullImage_Mode, |
+ BRDSrc::kDivisor_Mode, |
}; |
for (SkBitmapRegionDecoderInterface::Strategy strategy : strategies) { |