0

In skia, we can use SkPicture to record draw commands and then playback it, it works well. I am wondering if there is some ways to generate a skp file from the SkPicture, so that I can use debugger.skia.org to analyze the draw commands.

I know , it's easy to capture the skp file from Chrome web page or android package. For my own rendering engine , if it's possible to get the skp file from SkPicture?

Thanks.

1 Answers1

0

Yes this is what SkPicture::serialize() does. Take the Skia picture you want to write to a file, call serialize() on it, write the resulting SkData to a file with the .skp extension, and you should be able to open it in the Skia debugger.