Allow draw_to_canvas to pass through the GrDirectContext.
Some GM slides behave differently when a GrDirectContext is passed (e.g.
the CTMPathEffectGM disables itself when the GrDirectContext is non-null
because it asserts when run on GPU).
Change-Id: Ida18f191474f94426c6077d3a5de659e739056a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430476
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index f9a920f..fbdbb65 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -86,18 +86,18 @@
struct Src {
virtual ~Src() {}
- virtual Result SK_WARN_UNUSED_RESULT draw(GrDirectContext*, SkCanvas*) const = 0;
+ virtual Result SK_WARN_UNUSED_RESULT draw(GrDirectContext* context, SkCanvas* canvas) const = 0;
virtual SkISize size() const = 0;
virtual Name name() const = 0;
virtual void modifyGrContextOptions(GrContextOptions* options) const {}
virtual bool veto(SinkFlags) const { return false; }
virtual int pageCount() const { return 1; }
- virtual Result SK_WARN_UNUSED_RESULT draw(int, GrDirectContext* context,
+ virtual Result SK_WARN_UNUSED_RESULT draw([[maybe_unused]] int page, GrDirectContext* context,
SkCanvas* canvas) const {
return this->draw(context, canvas);
}
- virtual SkISize size(int) const { return this->size(); }
+ virtual SkISize size([[maybe_unused]] int page) const { return this->size(); }
// Force Tasks using this Src to run on the main thread?
virtual bool serial() const { return false; }