Index: android_webview/browser/browser_view_renderer.cc |
diff --git a/android_webview/browser/browser_view_renderer.cc b/android_webview/browser/browser_view_renderer.cc |
index 76e7d96853c2e46fd8e8667facb045c05cd1233d..960c0342d0a8eb78fb2e2d974e03841e40ce93fd 100644 |
--- a/android_webview/browser/browser_view_renderer.cc |
+++ b/android_webview/browser/browser_view_renderer.cc |
@@ -328,7 +328,9 @@ skia::RefPtr<SkPicture> BrowserViewRenderer::CapturePicture(int width, |
// Return empty Picture objects for empty SkPictures. |
if (width <= 0 || height <= 0) { |
- return skia::AdoptRef(new SkPicture); |
+ SkPictureRecorder emptyRecorder; |
+ emptyRecorder.beginRecording(0, 0); |
+ return skia::AdoptRef(emptyRecorder.endRecording()); |
} |
// Reset scroll back to the origin, will go back to the old |