OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The Android Open Source Project | 2 * Copyright 2011 The Android Open Source Project |
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 | 8 |
9 #ifndef SkBitmapRegionDecoder_DEFINED | 9 #ifndef SkBitmapRegionDecoder_DEFINED |
10 #define SkBitmapRegionDecoder_DEFINED | 10 #define SkBitmapRegionDecoder_DEFINED |
11 | 11 |
12 #include "SkBitmap.h" | 12 #include "SkBitmap.h" |
13 #include "SkImageDecoder.h" | 13 #include "SkImageDecoder.h" |
14 #include "SkStream.h" | 14 #include "SkStream.h" |
15 | 15 |
16 class SkIRect; | 16 struct SkIRect; |
17 | 17 |
18 /** | 18 /** |
19 * SkBitmapRegionDecoder can be used to decode a specified rect from an image. | 19 * SkBitmapRegionDecoder can be used to decode a specified rect from an image. |
20 * This is particularly useful when the original image is large and you only | 20 * This is particularly useful when the original image is large and you only |
21 * need parts of the image. | 21 * need parts of the image. |
22 * | 22 * |
23 * However, not all image codecs on all platforms support this feature so be | 23 * However, not all image codecs on all platforms support this feature so be |
24 * prepared to fallback to standard decoding if decodeRegion(...) returns false. | 24 * prepared to fallback to standard decoding if decodeRegion(...) returns false. |
25 */ | 25 */ |
26 class SkBitmapRegionDecoder { | 26 class SkBitmapRegionDecoder { |
(...skipping 18 matching lines...) Expand all Loading... |
45 int getHeight() const { return fHeight; } | 45 int getHeight() const { return fHeight; } |
46 | 46 |
47 private: | 47 private: |
48 SkImageDecoder* fDecoder; | 48 SkImageDecoder* fDecoder; |
49 SkStream* fStream; | 49 SkStream* fStream; |
50 int fWidth; | 50 int fWidth; |
51 int fHeight; | 51 int fHeight; |
52 }; | 52 }; |
53 | 53 |
54 #endif | 54 #endif |
OLD | NEW |