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

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: gpu 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 31e15741910bcf382a298d97148e9ff449b9b910..f4107228c5465df13df645e94cdb793ddcad1186 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -1054,6 +1054,12 @@ 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.
+ return (flags.type != SinkFlags::kRaster && flags.type != SinkFlags::kGPU)
mtklein 2016/08/15 20:35:37 maybe bool type_ok = flags.type == SinkFlags::kRa
f(malita) 2016/08/16 20:59:00 Done.
+ || 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