| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkBitmapRegionDecoder_DEFINED | 8 #ifndef SkBitmapRegionDecoder_DEFINED |
| 9 #define SkBitmapRegionDecoder_DEFINED | 9 #define SkBitmapRegionDecoder_DEFINED |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 * New implementations should return NULL if they do not s
upport | 49 * New implementations should return NULL if they do not s
upport |
| 50 * decoding to this color type. | 50 * decoding to this color type. |
| 51 * The old kOriginal_Strategy will decode to a default col
or type | 51 * The old kOriginal_Strategy will decode to a default col
or type |
| 52 * if this color type is unsupported. | 52 * if this color type is unsupported. |
| 53 * @return Pointer to a bitmap of the decoded region on success, N
ULL on | 53 * @return Pointer to a bitmap of the decoded region on success, N
ULL on |
| 54 * failure. | 54 * failure. |
| 55 */ | 55 */ |
| 56 virtual SkBitmap* decodeRegion(int start_x, int start_y, int width, | 56 virtual SkBitmap* decodeRegion(int start_x, int start_y, int width, |
| 57 int height, int sampleSize, | 57 int height, int sampleSize, |
| 58 SkColorType colorType) = 0; | 58 SkColorType colorType) = 0; |
| 59 /* |
| 60 * @param Requested destination color type |
| 61 * @return true if we support the requested color type and false otherwise |
| 62 */ |
| 63 virtual bool conversionSupported(SkColorType colorType) = 0; |
| 59 | 64 |
| 60 int width() const { return fWidth; } | 65 int width() const { return fWidth; } |
| 61 int height() const { return fHeight; } | 66 int height() const { return fHeight; } |
| 62 | 67 |
| 63 virtual ~SkBitmapRegionDecoderInterface() {} | 68 virtual ~SkBitmapRegionDecoderInterface() {} |
| 64 | 69 |
| 65 protected: | 70 protected: |
| 66 | 71 |
| 67 SkBitmapRegionDecoderInterface(int width, int height) | 72 SkBitmapRegionDecoderInterface(int width, int height) |
| 68 : fWidth(width) | 73 : fWidth(width) |
| 69 , fHeight(height) | 74 , fHeight(height) |
| 70 {} | 75 {} |
| 71 | 76 |
| 72 private: | 77 private: |
| 73 const int fWidth; | 78 const int fWidth; |
| 74 const int fHeight; | 79 const int fHeight; |
| 75 }; | 80 }; |
| 76 | 81 |
| 77 #endif | 82 #endif |
| OLD | NEW |