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

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

Issue 338633011: Deprecate SkPicture::clone(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add define for chrome 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 unified diff | Download patch
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2007 The Android Open Source Project 3 * Copyright 2007 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkPictureFlat.h" 10 #include "SkPictureFlat.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 if (NULL != src.fRecord.get()) { 179 if (NULL != src.fRecord.get()) {
180 fRecord.reset(copy(*src.fRecord, fWidth, fHeight)); 180 fRecord.reset(copy(*src.fRecord, fWidth, fHeight));
181 fUniqueID = src.uniqueID(); // need to call method to ensure != 0 181 fUniqueID = src.uniqueID(); // need to call method to ensure != 0
182 } 182 }
183 } 183 }
184 184
185 // fRecord OK 185 // fRecord OK
186 SkPicture::~SkPicture() {} 186 SkPicture::~SkPicture() {}
187 187
188 #ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE
188 // fRecord TODO, fix by deleting this method 189 // fRecord TODO, fix by deleting this method
189 SkPicture* SkPicture::clone() const { 190 SkPicture* SkPicture::clone() const {
190 SkPicture* clonedPicture = SkNEW(SkPicture); 191 SkPicture* clonedPicture = SkNEW(SkPicture);
191 this->clone(clonedPicture, 1); 192 this->clone(clonedPicture, 1);
192 return clonedPicture; 193 return clonedPicture;
193 } 194 }
194 195
195 // fRecord TODO, fix by deleting this method 196 // fRecord TODO, fix by deleting this method
196 void SkPicture::clone(SkPicture* pictures, int count) const { 197 void SkPicture::clone(SkPicture* pictures, int count) const {
197 SkPictCopyInfo copyInfo; 198 SkPictCopyInfo copyInfo;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // needed to create typeface playback 250 // needed to create typeface playback
250 copyInfo.controller.setupPlaybacks(); 251 copyInfo.controller.setupPlaybacks();
251 copyInfo.initialized = true; 252 copyInfo.initialized = true;
252 } 253 }
253 254
254 clone->fPlayback.reset(SkNEW_ARGS(SkPicturePlayback, (*fPlayback, &c opyInfo))); 255 clone->fPlayback.reset(SkNEW_ARGS(SkPicturePlayback, (*fPlayback, &c opyInfo)));
255 clone->fUniqueID = this->uniqueID(); // need to call method to ensur e != 0 256 clone->fUniqueID = this->uniqueID(); // need to call method to ensur e != 0
256 } 257 }
257 } 258 }
258 } 259 }
260 #endif//SK_SUPPORT_LEGACY_PICTURE_CLONE
259 261
260 // fRecord OK 262 // fRecord OK
261 void SkPicture::EXPERIMENTAL_addAccelData(const SkPicture::AccelData* data) cons t { 263 void SkPicture::EXPERIMENTAL_addAccelData(const SkPicture::AccelData* data) cons t {
262 fAccelData.reset(SkRef(data)); 264 fAccelData.reset(SkRef(data));
263 } 265 }
264 266
265 // fRecord OK 267 // fRecord OK
266 const SkPicture::AccelData* SkPicture::EXPERIMENTAL_getAccelData( 268 const SkPicture::AccelData* SkPicture::EXPERIMENTAL_getAccelData(
267 SkPicture::AccelData::Key key) const { 269 SkPicture::AccelData::Key key) const {
268 if (NULL != fAccelData.get() && fAccelData->getKey() == key) { 270 if (NULL != fAccelData.get() && fAccelData->getKey() == key) {
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 return fUniqueID; 559 return fUniqueID;
558 } 560 }
559 561
560 // fRecord OK 562 // fRecord OK
561 SkPicture::SkPicture(int width, int height, SkRecord* record) 563 SkPicture::SkPicture(int width, int height, SkRecord* record)
562 : fWidth(width) 564 : fWidth(width)
563 , fHeight(height) 565 , fHeight(height)
564 , fRecord(record) { 566 , fRecord(record) {
565 this->needsNewGenID(); 567 this->needsNewGenID();
566 } 568 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698