Remove use of default SkPicture constructor

Skia is removing the default SkPicture constructor. The only way to
get an SkPicture will be through SkPictureRecorder, CreateFromStream,
or CreateFromBuffer.

Review URL: https://codereview.chromium.org/387343003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282979 0039d316-1c4b-4281-b951-d872f2087c98
parent e960d073
...@@ -328,7 +328,9 @@ skia::RefPtr<SkPicture> BrowserViewRenderer::CapturePicture(int width, ...@@ -328,7 +328,9 @@ skia::RefPtr<SkPicture> BrowserViewRenderer::CapturePicture(int width,
// Return empty Picture objects for empty SkPictures. // Return empty Picture objects for empty SkPictures.
if (width <= 0 || height <= 0) { 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 // Reset scroll back to the origin, will go back to the old
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment