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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 enum Strategy { | 23 enum Strategy { |
24 kAndroidCodec_Strategy, // Uses SkAndroidCodec for scaling and subsettin
g | 24 kAndroidCodec_Strategy, // Uses SkAndroidCodec for scaling and subsettin
g |
25 }; | 25 }; |
26 | 26 |
27 /* | 27 /* |
28 * @param data Refs the data while this object exists, unrefs on destruc
tion | 28 * @param data Refs the data while this object exists, unrefs on destruc
tion |
29 * @param strategy Strategy used for scaling and subsetting | 29 * @param strategy Strategy used for scaling and subsetting |
30 * @return Tries to create an SkBitmapRegionDecoder, returns NULL on
failure | 30 * @return Tries to create an SkBitmapRegionDecoder, returns NULL on
failure |
31 */ | 31 */ |
32 static SkBitmapRegionDecoder* Create( | 32 static SkBitmapRegionDecoder* Create(sk_sp<SkData>, Strategy strategy); |
33 SkData* data, Strategy strategy); | |
34 | 33 |
35 /* | 34 /* |
36 * @param stream Takes ownership of the stream | 35 * @param stream Takes ownership of the stream |
37 * @param strategy Strategy used for scaling and subsetting | 36 * @param strategy Strategy used for scaling and subsetting |
38 * @return Tries to create an SkBitmapRegionDecoder, returns NULL on
failure | 37 * @return Tries to create an SkBitmapRegionDecoder, returns NULL on
failure |
39 */ | 38 */ |
40 static SkBitmapRegionDecoder* Create( | 39 static SkBitmapRegionDecoder* Create( |
41 SkStreamRewindable* stream, Strategy strategy); | 40 SkStreamRewindable* stream, Strategy strategy); |
42 | 41 |
43 /* | 42 /* |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 : fWidth(width) | 79 : fWidth(width) |
81 , fHeight(height) | 80 , fHeight(height) |
82 {} | 81 {} |
83 | 82 |
84 private: | 83 private: |
85 const int fWidth; | 84 const int fWidth; |
86 const int fHeight; | 85 const int fHeight; |
87 }; | 86 }; |
88 | 87 |
89 #endif | 88 #endif |
OLD | NEW |