Index: cc/layers/picture_layer.cc |
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc |
index e47f4b88d13e19d2992068bc06939abeab445031..2e1f0e14813aa56fa45276b504d424857b749397 100644 |
--- a/cc/layers/picture_layer.cc |
+++ b/cc/layers/picture_layer.cc |
@@ -186,10 +186,10 @@ skia::RefPtr<SkPicture> PictureLayer::GetPicture() const { |
int height = bounds().height(); |
gfx::RectF opaque; |
- skia::RefPtr<SkPicture> picture = skia::AdoptRef(new SkPicture); |
- SkCanvas* canvas = picture->beginRecording(width, height); |
+ SkPictureRecorder recorder; |
+ SkCanvas* canvas = recorder.beginRecording(width, height); |
client_->PaintContents(canvas, gfx::Rect(width, height), &opaque); |
- picture->endRecording(); |
+ skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording()); |
return picture; |
} |