diff options
author | 2016-08-16 14:23:29 -0700 | |
---|---|---|
committer | 2016-08-16 14:23:29 -0700 | |
commit | 179d88522c3cdd49480e34482c29a8afb027a6ad (patch) | |
tree | fe9a26a467cf57b8c54187a5f927bd59dbee0bc6 /dm/DMSrcSink.cpp | |
parent | 8fd23a86d0d16c93e4fa08f79cdcca4b48b6d7f9 (diff) |
Only test SVG DM sources against direct raster/gpu sinks.
There isn't much value in testing against indirect or vector sinks.
R=mtklein@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2252443002
Review-Url: https://codereview.chromium.org/2252443002
Diffstat (limited to 'dm/DMSrcSink.cpp')
-rw-r--r-- | dm/DMSrcSink.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 638af13b7b..caf6f52fe2 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) /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |