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:
parent
8fd23a86d0
commit
179d88522c
@ -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)
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user