Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: cc/resources/picture.cc

Issue 380323002: Switch to one-at-a-time SkPicture::clone interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index a19fd33f3a0724906b5fad324c0bd7d3a5fc28ee..5244ec9aa0b391c313d97113a2c7f0209439abed 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -231,15 +231,12 @@ void Picture::CloneForDrawing(int num_threads) {
raster_thread_checker_.DetachFromThread();
if (num_threads > 1) {
- scoped_ptr<SkPicture[]> clones(new SkPicture[num_threads - 1]);
+ scoped_ptr<SkPicture* []> clones(new SkPicture* [num_threads - 1]);
danakj 2014/07/10 19:57:05 This is an array of raw SkRefCnt pointers? Since s
mtklein 2014/07/10 20:09:51 Why don't we rewrite this to just use the other ex
picture_->clone(&clones[0], num_threads - 1);
for (int i = 0; i < num_threads - 1; i++) {
- scoped_refptr<Picture> clone = make_scoped_refptr(
- new Picture(skia::AdoptRef(new SkPicture(clones[i])),
- layer_rect_,
- opaque_rect_,
- pixel_refs_));
+ scoped_refptr<Picture> clone = make_scoped_refptr(new Picture(
+ skia::AdoptRef(clones[i]), layer_rect_, opaque_rect_, pixel_refs_));
clones_.push_back(clone);
clone->EmitTraceSnapshotAlias(this);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698