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

Unified Diff: dm/DMSrcSink.cpp

Issue 2252443002: Only test SVG DM sources against direct raster/gpu sinks. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review Created 4 years, 4 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/DMSrcSink.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 638af13b7b5c00f03e34a283b04aa5a3ef1d82c2..caf6f52fe24899bd45c24f2ae966306a13fa8027 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -1056,6 +1056,14 @@ SkISize SVGSrc::size() const {
Name SVGSrc::name() const { return SkOSPath::Basename(fPath.c_str()); }
+bool SVGSrc::veto(SinkFlags flags) const {
+ // No need to test to non-(raster||gpu) or indirect backends.
+ bool type_ok = flags.type == SinkFlags::kRaster
+ || flags.type == SinkFlags::kGPU;
+
+ return !type_ok || flags.approach != SinkFlags::kDirect;
+}
+
#endif // defined(SK_XML)
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
« no previous file with comments | « dm/DMSrcSink.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698