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

Unified Diff: dm/DMSrcSink.h

Issue 894013002: patch from issue 886233004 at patchset 40001 (http://crrev.com/886233004#ps40001) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/DMGpuSupport.h ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.h
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index 1fdc9ed927f85a6f78f6457fd2062e717c92c1a5..48c572b1a7d8e771a0186b395ebb7fc0b9e60c46 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -33,9 +33,9 @@ struct Src {
struct Sink {
virtual ~Sink() {}
- // You may write to either the bitmap or stream.
- virtual Error SK_WARN_UNUSED_RESULT draw(const Src&, SkBitmap*, SkWStream*) const
- = 0;
+ // You may write to either the bitmap or stream. If you write to log, we'll print that out.
+ virtual Error SK_WARN_UNUSED_RESULT draw(const Src&, SkBitmap*, SkWStream*, SkString* log)
+ const = 0;
// Sinks in the same enclave (except kAnyThread_Enclave) will run serially on the same thread.
virtual int enclave() const = 0;
@@ -90,7 +90,7 @@ class GPUSink : public Sink {
public:
GPUSink(GrContextFactory::GLContextType, GrGLStandard, int samples, bool dfText, bool threaded);
- Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE;
const char* fileExtension() const SK_OVERRIDE { return "png"; }
private:
@@ -105,7 +105,7 @@ class PDFSink : public Sink {
public:
PDFSink();
- Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kPDFSink_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "pdf"; }
};
@@ -114,7 +114,7 @@ class RasterSink : public Sink {
public:
explicit RasterSink(SkColorType);
- Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "png"; }
private:
@@ -125,7 +125,7 @@ class SKPSink : public Sink {
public:
SKPSink();
- Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "skp"; }
};
@@ -134,7 +134,7 @@ class SVGSink : public Sink {
public:
SVGSink();
- Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "svg"; }
};
@@ -146,7 +146,7 @@ class ViaMatrix : public Sink {
public:
ViaMatrix(SkMatrix, Sink*);
- Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
private:
@@ -158,7 +158,7 @@ class ViaPipe : public Sink {
public:
explicit ViaPipe(Sink*);
- Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
private:
@@ -169,7 +169,7 @@ class ViaSerialization : public Sink {
public:
explicit ViaSerialization(Sink*);
- Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
private:
@@ -180,7 +180,7 @@ class ViaTiles : public Sink {
public:
ViaTiles(int w, int h, SkBBHFactory*, Sink*);
- Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
private:
@@ -191,7 +191,7 @@ private:
class NullSink : public Sink {
public:
- Error draw(const Src& src, SkBitmap*, SkWStream* out) const SK_OVERRIDE {
+ Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE {
return src.draw(SkCreateNullCanvas());
}
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
« no previous file with comments | « dm/DMGpuSupport.h ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698