OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 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 #include "SkTypes.h" | 8 #include "SkTypes.h" |
9 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) | 9 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
10 | 10 |
| 11 #include "SkBitmap.h" |
11 #include "SkCGUtils.h" | 12 #include "SkCGUtils.h" |
12 #include "SkColorPriv.h" | 13 #include "SkColorPriv.h" |
13 #include "SkData.h" | 14 #include "SkData.h" |
14 #include "SkImageEncoder.h" | 15 #include "SkImageEncoder.h" |
15 #include "SkMovie.h" | |
16 #include "SkStream.h" | 16 #include "SkStream.h" |
17 #include "SkStreamPriv.h" | 17 #include "SkStreamPriv.h" |
18 #include "SkTemplates.h" | 18 #include "SkTemplates.h" |
19 #include "SkUnPreMultiply.h" | 19 #include "SkUnPreMultiply.h" |
20 | 20 |
21 #ifdef SK_BUILD_FOR_MAC | 21 #ifdef SK_BUILD_FOR_MAC |
22 #include <ApplicationServices/ApplicationServices.h> | 22 #include <ApplicationServices/ApplicationServices.h> |
23 #endif | 23 #endif |
24 | 24 |
25 #ifdef SK_BUILD_FOR_IOS | 25 #ifdef SK_BUILD_FOR_IOS |
26 #include <CoreGraphics/CoreGraphics.h> | 26 #include <CoreGraphics/CoreGraphics.h> |
27 #include <ImageIO/ImageIO.h> | 27 #include <ImageIO/ImageIO.h> |
28 #include <MobileCoreServices/MobileCoreServices.h> | 28 #include <MobileCoreServices/MobileCoreServices.h> |
29 #endif | 29 #endif |
30 | 30 |
31 ///////////////////////////////////////////////////////////////////////// | |
32 | |
33 SkMovie* SkMovie::DecodeStream(SkStreamRewindable* stream) { | |
34 return nullptr; | |
35 } | |
36 | |
37 ///////////////////////////////////////////////////////////////////////// | |
38 | |
39 static size_t consumer_put(void* info, const void* buffer, size_t count) { | 31 static size_t consumer_put(void* info, const void* buffer, size_t count) { |
40 SkWStream* stream = reinterpret_cast<SkWStream*>(info); | 32 SkWStream* stream = reinterpret_cast<SkWStream*>(info); |
41 return stream->write(buffer, count) ? count : 0; | 33 return stream->write(buffer, count) ? count : 0; |
42 } | 34 } |
43 | 35 |
44 static void consumer_release(void* info) { | 36 static void consumer_release(void* info) { |
45 // we do nothing, since by design we don't "own" the stream (i.e. info) | 37 // we do nothing, since by design we don't "own" the stream (i.e. info) |
46 } | 38 } |
47 | 39 |
48 static CGDataConsumerRef SkStreamToCGDataConsumer(SkWStream* stream) { | 40 static CGDataConsumerRef SkStreamToCGDataConsumer(SkWStream* stream) { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 class SkPNGImageEncoder_CG : public SkImageEncoder_CG { | 145 class SkPNGImageEncoder_CG : public SkImageEncoder_CG { |
154 public: | 146 public: |
155 SkPNGImageEncoder_CG() | 147 SkPNGImageEncoder_CG() |
156 : SkImageEncoder_CG(kPNG_Type) { | 148 : SkImageEncoder_CG(kPNG_Type) { |
157 } | 149 } |
158 }; | 150 }; |
159 | 151 |
160 DEFINE_ENCODER_CREATOR(PNGImageEncoder_CG); | 152 DEFINE_ENCODER_CREATOR(PNGImageEncoder_CG); |
161 | 153 |
162 #endif//defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) | 154 #endif//defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
OLD | NEW |