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 #include "SkBitmapRegionCanvas.h" | 8 #include "SkBitmapRegionCanvas.h" |
9 #include "SkBitmapRegionCodec.h" | 9 #include "SkBitmapRegionCodec.h" |
10 #include "SkBitmapRegionDecoder.h" | 10 #include "SkBitmapRegionDecoder.h" |
11 #include "SkAndroidCodec.h" | 11 #include "SkAndroidCodec.h" |
12 #include "SkCodec.h" | 12 #include "SkCodec.h" |
13 #include "SkCodecPriv.h" | 13 #include "SkCodecPriv.h" |
| 14 #include "SkImageDecoder.h" |
14 | 15 |
15 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create( | 16 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create( |
16 SkData* data, Strategy strategy) { | 17 SkData* data, Strategy strategy) { |
17 return SkBitmapRegionDecoder::Create(new SkMemoryStream(data), | 18 return SkBitmapRegionDecoder::Create(new SkMemoryStream(data), |
18 strategy); | 19 strategy); |
19 } | 20 } |
20 | 21 |
21 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create( | 22 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create( |
22 SkStreamRewindable* stream, Strategy strategy) { | 23 SkStreamRewindable* stream, Strategy strategy) { |
23 SkAutoTDelete<SkStreamRewindable> streamDeleter(stream); | 24 SkAutoTDelete<SkStreamRewindable> streamDeleter(stream); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 return nullptr; | 67 return nullptr; |
67 } | 68 } |
68 | 69 |
69 return new SkBitmapRegionCodec(codec.release()); | 70 return new SkBitmapRegionCodec(codec.release()); |
70 } | 71 } |
71 default: | 72 default: |
72 SkASSERT(false); | 73 SkASSERT(false); |
73 return nullptr; | 74 return nullptr; |
74 } | 75 } |
75 } | 76 } |
OLD | NEW |