Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: dm/DMSrcSink.h

Issue 2201323003: add pipecanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add test for writeImage Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | src/core/SkPipe.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 class XPSSink : public Sink { 327 class XPSSink : public Sink {
328 public: 328 public:
329 XPSSink(); 329 XPSSink();
330 330
331 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 331 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
332 const char* fileExtension() const override { return "xps"; } 332 const char* fileExtension() const override { return "xps"; }
333 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; } 333 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; }
334 }; 334 };
335 335
336 class PipeSink : public Sink {
337 public:
338 PipeSink();
339
340 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
341 const char* fileExtension() const override { return "skpipe"; }
342 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; }
343 };
344
336 class RasterSink : public Sink { 345 class RasterSink : public Sink {
337 public: 346 public:
338 explicit RasterSink(SkColorType, sk_sp<SkColorSpace> = nullptr); 347 explicit RasterSink(SkColorType, sk_sp<SkColorSpace> = nullptr);
339 348
340 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 349 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
341 const char* fileExtension() const override { return "png"; } 350 const char* fileExtension() const override { return "png"; }
342 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kRaster, Sin kFlags::kDirect }; } 351 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kRaster, Sin kFlags::kDirect }; }
343 private: 352 private:
344 SkColorType fColorType; 353 SkColorType fColorType;
345 sk_sp<SkColorSpace> fColorSpace; 354 sk_sp<SkColorSpace> fColorSpace;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 explicit ViaSerialization(Sink* sink) : Via(sink) {} 410 explicit ViaSerialization(Sink* sink) : Via(sink) {}
402 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 411 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
403 }; 412 };
404 413
405 class ViaPicture : public Via { 414 class ViaPicture : public Via {
406 public: 415 public:
407 explicit ViaPicture(Sink* sink) : Via(sink) {} 416 explicit ViaPicture(Sink* sink) : Via(sink) {}
408 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 417 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
409 }; 418 };
410 419
420 class ViaPipe : public Via {
421 public:
422 explicit ViaPipe(Sink* sink) : Via(sink) {}
423 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
424 };
425
411 class ViaDefer : public Via { 426 class ViaDefer : public Via {
412 public: 427 public:
413 explicit ViaDefer(Sink* sink) : Via(sink) {} 428 explicit ViaDefer(Sink* sink) : Via(sink) {}
414 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 429 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
415 }; 430 };
416 431
417 class ViaTiles : public Via { 432 class ViaTiles : public Via {
418 public: 433 public:
419 ViaTiles(int w, int h, SkBBHFactory*, Sink*); 434 ViaTiles(int w, int h, SkBBHFactory*, Sink*);
420 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 435 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
(...skipping 28 matching lines...) Expand all
449 464
450 class ViaLite : public Via { 465 class ViaLite : public Via {
451 public: 466 public:
452 explicit ViaLite(Sink* sink) : Via(sink) {} 467 explicit ViaLite(Sink* sink) : Via(sink) {}
453 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 468 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
454 }; 469 };
455 470
456 } // namespace DM 471 } // namespace DM
457 472
458 #endif//DMSrcSink_DEFINED 473 #endif//DMSrcSink_DEFINED
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | src/core/SkPipe.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698