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
This commit is contained in:
fmalita 2016-08-16 14:23:29 -07:00 committed by Commit bot
parent 8fd23a86d0
commit 179d88522c
2 changed files with 9 additions and 0 deletions

View File

@ -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)
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@ -256,6 +256,7 @@ public:
Error draw(SkCanvas*) const override;
SkISize size() const override;
Name name() const override;
bool veto(SinkFlags) const override;
private:
Path fPath;