summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nathaniel Nifong <nifong@google.com> 2021-01-08 21:12:27 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-01-08 21:12:27 +0000
commitb5ccb2acc66c86ecffca17fa11d404da724555f4 (patch)
treeaf50175566f4fa05033e01a477566ae0635f7fb4
parentf452a2a34d5a7fbafbc1d08f814b3f23a0c7231c (diff)
parent98fabaf66af1b95f78ce07b8e69ff1785791f919 (diff)
Merge "Pass lambda to endPage callback which read back textures"
-rw-r--r--libs/renderengine/skia/debug/SkiaCapture.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/renderengine/skia/debug/SkiaCapture.cpp b/libs/renderengine/skia/debug/SkiaCapture.cpp
index 8006a111bd..e9cfead8b6 100644
--- a/libs/renderengine/skia/debug/SkiaCapture.cpp
+++ b/libs/renderengine/skia/debug/SkiaCapture.cpp
@@ -129,8 +129,14 @@ bool SkiaCapture::setupMultiFrameCapture() {
// SkDocuments don't take ownership of the streams they write.
// we need to keep it until after mMultiPic.close()
// procs is passed as a pointer, but just as a method of having an optional default.
- // procs doesn't need to outlive this Make call.
- mMultiPic = SkMakeMultiPictureDocument(mOpenMultiPicStream.get(), &procs);
+ // procs doesn't need to outlive this Make call
+ // The last argument is a callback for the endPage behavior.
+ // See SkSharingProc.h for more explanation of this callback.
+ mMultiPic = SkMakeMultiPictureDocument(
+ mOpenMultiPicStream.get(), &procs,
+ [sharingCtx = mSerialContext.get()](const SkPicture* pic) {
+ SkSharingSerialContext::collectNonTextureImagesFromPicture(pic, sharingCtx);
+ });
mCaptureRunning = true;
return true;
} else {