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
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index 64897d2..a987c7d 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -124,12 +124,14 @@
     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 @@
     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