fix leaked picture
BUG=skia: TBR= Review URL: https://codereview.chromium.org/1329143006
This commit is contained in:
parent
9583ab9d7a
commit
25507d9a94
@ -32,7 +32,8 @@ static SkImage* make_raster_image(int width, int height, SkColor colors[2]) {
|
||||
static SkImage* make_picture_image(int width, int height, SkColor colors[2]) {
|
||||
SkPictureRecorder recorder;
|
||||
draw(recorder.beginRecording(SkRect::MakeIWH(width, height)), width, height, colors);
|
||||
return SkImage::NewFromPicture(recorder.endRecording(), SkISize::Make(width, height),
|
||||
SkAutoTUnref<SkPicture> picture(recorder.endRecording());
|
||||
return SkImage::NewFromPicture(picture, SkISize::Make(width, height),
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user