Fix leak of the picture after tracing it to a file

This commit is contained in:
Chinmay Garde 2015-09-22 16:08:39 -07:00
parent 70c98ff994
commit fedda1d8df

View File

@ -86,8 +86,9 @@ PaintContext::ScopedFrame::~ScopedFrame() {
context_.endFrame(*this);
if (trace_file_name_.length() > 0) {
auto picture = trace_recorder_->endRecordingAsPicture();
SkPicture* picture = trace_recorder_->endRecordingAsPicture();
SerializePicture(trace_file_name_.c_str(), picture);
picture->unref();
}
}