| Index: tools/SkBitmapRegionCanvas.h
|
| diff --git a/tools/SkBitmapRegionCanvas.h b/tools/SkBitmapRegionCanvas.h
|
| index f82e9fa77a941b01dee6d746d2a2fb02006ea40e..ba3fa4563d947d14e6bb098c942b4f1846ced230 100644
|
| --- a/tools/SkBitmapRegionCanvas.h
|
| +++ b/tools/SkBitmapRegionCanvas.h
|
| @@ -24,22 +24,24 @@ public:
|
| */
|
| SkBitmapRegionCanvas(SkCodec* decoder);
|
|
|
| - /*
|
| - * Three differences from the Android version:
|
| - * Returns a Skia bitmap instead of an Android bitmap.
|
| - * Android version attempts to reuse a recycled bitmap.
|
| - * Removed the options object and used parameters for color type and
|
| - * sample size.
|
| - */
|
| - SkBitmap* decodeRegion(int start_x, int start_y, int width, int height,
|
| - int sampleSize, SkColorType prefColorType) override;
|
| + bool prepareRegion(const SkIRect& desiredSubset, int sampleSize,
|
| + SkColorType colorType, bool requireUnpremul, SkImageInfo* outSize) override;
|
|
|
| - bool conversionSupported(SkColorType colorType) override;
|
| + bool decodeRegion(SkBitmap& bitmap) override;
|
|
|
| private:
|
|
|
| SkAutoTDelete<SkCodec> fDecoder;
|
|
|
| + // Fields set by prepareRegion()
|
| + int fOutX; // Offset of decoded pixels in output bitmap
|
| + int fOutY; // Offset of decoded pixels in output bitmap
|
| + SkImageInfo fOutInfo; // Image properties for output bitmap
|
| + SkImageInfo fDecodeInfo; // Image properties for fDecoder
|
| + int fSampleSize; // Integer downscale factor
|
| + SkIRect fSubset; // Subset of the original image to decode
|
| + SubsetType fSubsetType;
|
| +
|
| typedef SkBitmapRegionDecoderInterface INHERITED;
|
|
|
| };
|
|
|