diff options
author | scroggo <scroggo@google.com> | 2016-02-08 15:09:48 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-08 15:09:48 -0800 |
commit | 3ac66e98f8701b8105a4c6ae85de61a9e8e5343a (patch) | |
tree | ff4053cfd5b8b0b02bb45fbf89e3365f7a9e812d /dm/DMSrcSink.h | |
parent | fc57a3375eef897384a55fd85e95ba4394fbf67b (diff) |
Optionally run RAW images serially
RAW images use a lot of memory. Add a new FLAG to run one at a time so
we have less risk of running out of memory.
Isolate RAW images to their own thread on particular devices where our
images cause OOM errors.
Locally, this drops the max memory use from 3945 MB to 1664 MB (running only --image --images <RAW images we test>)
BUG=skia:4912
BUG=skia:4878
BUG=b/27035849
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1681553003
Review URL: https://codereview.chromium.org/1681553003
Diffstat (limited to 'dm/DMSrcSink.h')
-rw-r--r-- | dm/DMSrcSink.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h index 64897d20bc..a987c7d45d 100644 --- a/dm/DMSrcSink.h +++ b/dm/DMSrcSink.h @@ -124,12 +124,14 @@ public: SkISize size() const override; Name name() const override; bool veto(SinkFlags) const override; + bool serial() const override { return fRunSerially; } private: Path fPath; Mode fMode; DstColorType fDstColorType; SkAlphaType fDstAlphaType; float fScale; + bool fRunSerially; }; class AndroidCodecSrc : public Src { @@ -147,12 +149,14 @@ public: SkISize size() const override; Name name() const override; bool veto(SinkFlags) const override; + bool serial() const override { return fRunSerially; } private: Path fPath; Mode fMode; CodecSrc::DstColorType fDstColorType; SkAlphaType fDstAlphaType; int fSampleSize; + bool fRunSerially; }; // Allows for testing of various implementations of Android's BitmapRegionDecoder |