diff options
author | fmalita <fmalita@chromium.org> | 2016-11-08 07:13:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-08 07:13:45 -0800 |
commit | acd2f5cddc631d5008a04da483d630968df307c9 (patch) | |
tree | c0e57e4d5c07d2762f2d6bebe096a80be51e3866 /dm/DMSrcSink.h | |
parent | 9075634d60cc8ce979e3007d4ba1d0e57afc6644 (diff) |
Fix DM race in SVGSrc
The SVG source currently attempts to build the DOM lazily, in response
to draw() or size() calls. But apprently DM may call these
concurrently.
Build the DOM in the constructor instead, to avoid races (and the need
for synchronization).
R=robertphillips@google.com,mtklein@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2482123003
Review-Url: https://codereview.chromium.org/2482123003
Diffstat (limited to 'dm/DMSrcSink.h')
-rw-r--r-- | dm/DMSrcSink.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h index bb60115051..cac8848307 100644 --- a/dm/DMSrcSink.h +++ b/dm/DMSrcSink.h @@ -261,11 +261,9 @@ public: bool veto(SinkFlags) const override; private: - Error ensureDom() const; - - Path fPath; - mutable sk_sp<SkSVGDOM> fDom; - mutable SkScalar fScale; + Name fName; + sk_sp<SkSVGDOM> fDom; + SkScalar fScale; typedef Src INHERITED; }; |