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

Side by Side Diff: src/core/SkPictureRecorder.cpp

Issue 746553002: SkData -> SkPicture::SnapshotArray (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ctor Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/core/SkPicture.cpp ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkData.h" 8 #include "SkData.h"
9 #include "SkLayerInfo.h" 9 #include "SkLayerInfo.h"
10 #include "SkPictureRecorder.h" 10 #include "SkPictureRecorder.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 if (saveLayerData) { 54 if (saveLayerData) {
55 SkRecordComputeLayers(fCullRect, *fRecord, fBBH.get(), saveLayerData ); 55 SkRecordComputeLayers(fCullRect, *fRecord, fBBH.get(), saveLayerData );
56 } else { 56 } else {
57 SkRecordFillBounds(fCullRect, *fRecord, fBBH.get()); 57 SkRecordFillBounds(fCullRect, *fRecord, fBBH.get());
58 } 58 }
59 } 59 }
60 60
61 // TODO: we should remember these from our caller 61 // TODO: we should remember these from our caller
62 SkBBHFactory* factory = NULL; 62 SkBBHFactory* factory = NULL;
63 uint32_t recordFlags = 0; 63 uint32_t recordFlags = 0;
64 SkAutoDataUnref drawablePicts(fRecorder->newDrawableSnapshot(factory, record Flags)); 64 SkAutoTUnref<SkPicture::SnapshotArray> drawablePicts(
65 fRecorder->newDrawableSnapshot(factory, recordFlags));
65 SkPicture* pict = SkNEW_ARGS(SkPicture, (fCullRect, fRecord.detach(), 66 SkPicture* pict = SkNEW_ARGS(SkPicture, (fCullRect, fRecord.detach(),
66 drawablePicts, fBBH.get())); 67 drawablePicts.detach(), fBBH.get()) );
67 68
68 if (saveLayerData) { 69 if (saveLayerData) {
69 pict->EXPERIMENTAL_addAccelData(saveLayerData); 70 pict->EXPERIMENTAL_addAccelData(saveLayerData);
70 } 71 }
71 72
72 return pict; 73 return pict;
73 } 74 }
74 75
75 void SkPictureRecorder::partialReplay(SkCanvas* canvas) const { 76 void SkPictureRecorder::partialReplay(SkCanvas* canvas) const {
76 if (NULL == canvas) { 77 if (NULL == canvas) {
77 return; 78 return;
78 } 79 }
79 80
80 int drawableCount = 0; 81 int drawableCount = 0;
81 SkRecordDraw(*fRecord, canvas, NULL, drawableCount, NULL/*bbh*/, NULL/*callb ack*/); 82 SkRecordDraw(*fRecord, canvas, NULL, drawableCount, NULL/*bbh*/, NULL/*callb ack*/);
82 } 83 }
OLDNEW
« no previous file with comments | « src/core/SkPicture.cpp ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698