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 DMSrcSink_DEFINED | 8 #ifndef DMSrcSink_DEFINED |
9 #define DMSrcSink_DEFINED | 9 #define DMSrcSink_DEFINED |
10 | 10 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 public: | 242 public: |
243 XPSSink(); | 243 XPSSink(); |
244 | 244 |
245 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 245 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
246 const char* fileExtension() const override { return "xps"; } | 246 const char* fileExtension() const override { return "xps"; } |
247 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin
kFlags::kDirect }; } | 247 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin
kFlags::kDirect }; } |
248 }; | 248 }; |
249 | 249 |
250 class RasterSink : public Sink { | 250 class RasterSink : public Sink { |
251 public: | 251 public: |
252 explicit RasterSink(SkColorType); | 252 explicit RasterSink(SkColorType, SkColorProfileType=kLinear_SkColorProfileTy
pe); |
253 | 253 |
254 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 254 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
255 const char* fileExtension() const override { return "png"; } | 255 const char* fileExtension() const override { return "png"; } |
256 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kRaster, Sin
kFlags::kDirect }; } | 256 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kRaster, Sin
kFlags::kDirect }; } |
257 private: | 257 private: |
258 SkColorType fColorType; | 258 SkColorType fColorType; |
| 259 SkColorProfileType fProfileType; |
259 }; | 260 }; |
260 | 261 |
261 class SKPSink : public Sink { | 262 class SKPSink : public Sink { |
262 public: | 263 public: |
263 SKPSink(); | 264 SKPSink(); |
264 | 265 |
265 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 266 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
266 const char* fileExtension() const override { return "skp"; } | 267 const char* fileExtension() const override { return "skp"; } |
267 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin
kFlags::kDirect }; } | 268 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin
kFlags::kDirect }; } |
268 }; | 269 }; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 359 |
359 class ViaMojo : public Via { | 360 class ViaMojo : public Via { |
360 public: | 361 public: |
361 explicit ViaMojo(Sink* sink) : Via(sink) {} | 362 explicit ViaMojo(Sink* sink) : Via(sink) {} |
362 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 363 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
363 }; | 364 }; |
364 | 365 |
365 } // namespace DM | 366 } // namespace DM |
366 | 367 |
367 #endif//DMSrcSink_DEFINED | 368 #endif//DMSrcSink_DEFINED |
OLD | NEW |