Switch to one-at-a-time SkPicture::clone interface

This updates Chromium to use the one-at-a-time SkPicture
clone interface since Skia is moving towards removing 
SkPicture's default and copy constructors.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282668 0039d316-1c4b-4281-b951-d872f2087c98
parent 19b48636
...@@ -231,15 +231,12 @@ void Picture::CloneForDrawing(int num_threads) { ...@@ -231,15 +231,12 @@ void Picture::CloneForDrawing(int num_threads) {
raster_thread_checker_.DetachFromThread(); raster_thread_checker_.DetachFromThread();
if (num_threads > 1) { if (num_threads > 1) {
scoped_ptr<SkPicture[]> clones(new SkPicture[num_threads - 1]);
picture_->clone(&clones[0], num_threads - 1);
for (int i = 0; i < num_threads - 1; i++) { for (int i = 0; i < num_threads - 1; i++) {
scoped_refptr<Picture> clone = make_scoped_refptr( scoped_refptr<Picture> clone =
new Picture(skia::AdoptRef(new SkPicture(clones[i])), new Picture(skia::AdoptRef(picture_->clone()),
layer_rect_, layer_rect_,
opaque_rect_, opaque_rect_,
pixel_refs_)); pixel_refs_);
clones_.push_back(clone); clones_.push_back(clone);
clone->EmitTraceSnapshotAlias(this); clone->EmitTraceSnapshotAlias(this);
......
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