Chromium Code Reviews| Index: tools/SkBitmapRegionDecoderInterface.cpp |
| diff --git a/tools/SkBitmapRegionDecoderInterface.cpp b/tools/SkBitmapRegionDecoderInterface.cpp |
| index 835ed9aa56426cbda09b49b19e814a91e7f21514..65ff74e30e0ef4b16e803b4b200e58076bcf0a60 100644 |
| --- a/tools/SkBitmapRegionDecoderInterface.cpp |
| +++ b/tools/SkBitmapRegionDecoderInterface.cpp |
| @@ -6,8 +6,10 @@ |
| */ |
| #include "SkBitmapRegionCanvas.h" |
| +#include "SkBitmapRegionCodec.h" |
| #include "SkBitmapRegionDecoderInterface.h" |
| #include "SkBitmapRegionSampler.h" |
| +#include "SkAndroidCodec.h" |
| #include "SkCodec.h" |
| #include "SkCodecPriv.h" |
| #include "SkImageDecoder.h" |
| @@ -46,6 +48,15 @@ SkBitmapRegionDecoderInterface* SkBitmapRegionDecoderInterface::CreateBitmapRegi |
| } |
| return new SkBitmapRegionCanvas(codec.detach()); |
| } |
| + case kAndroidCodec_Strategy: { |
| + SkAutoTDelete<SkAndroidCodec> codec = |
| + SkAndroidCodec::NewFromStream(streamDeleter.detach()); |
|
scroggo
2015/10/21 20:56:20
Since this targets BRD, which always uses an SkMem
msarett
2015/10/21 22:00:00
Yeah I think so.
SkDatas are more flexible than S
|
| + if (NULL == codec) { |
| + SkCodecPrintf("Error: Failed to create codec.\n"); |
| + return NULL; |
| + } |
| + return new SkBitmapRegionCodec(codec.detach()); |
| + } |
| default: |
| SkASSERT(false); |
| return nullptr; |