diff options
| author | 2021-05-10 21:20:25 -0700 | |
|---|---|---|
| committer | 2021-05-11 04:27:54 +0000 | |
| commit | b154792a39a2fa9bfade621c1a30c8232129e151 (patch) | |
| tree | 5db36b4268099fa7e2c9f8ab66e62be7cf142094 | |
| parent | 38e5def5ceb39f10506e263c0cd55f021c54aa14 (diff) | |
HWUI: mSerialContext needs to outlive other serializing members
mSerialContext is used as the serialization context, and need to
outlive mOpenMultiPicStream and mMultiPic and those are referencing
it in SkSharingSerialContext SkSharingSerialContext::serializeImage
Test: https://buganizer.corp.google.com/issues/182710292#comment16
Bug: 183049238
Change-Id: I25842e492d5efd7a7532964bddca61559d50ebe1
| -rw-r--r-- | libs/hwui/pipeline/skia/SkiaPipeline.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.h b/libs/hwui/pipeline/skia/SkiaPipeline.h index 100bfb6b159a..46580358aaf5 100644 --- a/libs/hwui/pipeline/skia/SkiaPipeline.h +++ b/libs/hwui/pipeline/skia/SkiaPipeline.h @@ -137,9 +137,10 @@ private: int mCaptureSequence = 0; // Multi frame serialization stream and writer used when serializing more than one frame. + std::unique_ptr<SkSharingSerialContext> mSerialContext; // Must be declared before any other + // serializing member std::unique_ptr<SkFILEWStream> mOpenMultiPicStream; sk_sp<SkDocument> mMultiPic; - std::unique_ptr<SkSharingSerialContext> mSerialContext; /** * mRecorder holds the current picture recorder when serializing in either SingleFrameSKP or |