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

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

Issue 470333002: approximateOpCount (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureData.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 /* 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 *fDeletionListeners.append() = SkRef(listener); 448 *fDeletionListeners.append() = SkRef(listener);
449 } 449 }
450 450
451 void SkPicture::callDeletionListeners() { 451 void SkPicture::callDeletionListeners() {
452 for (int i = 0; i < fDeletionListeners.count(); ++i) { 452 for (int i = 0; i < fDeletionListeners.count(); ++i) {
453 fDeletionListeners[i]->onDeletion(this->uniqueID()); 453 fDeletionListeners[i]->onDeletion(this->uniqueID());
454 } 454 }
455 455
456 fDeletionListeners.unrefAll(); 456 fDeletionListeners.unrefAll();
457 } 457 }
458
459 // fRecord OK
460 int SkPicture::approximateOpCount() const {
461 SkASSERT(fRecord.get() || fData.get());
462 if (fRecord.get()) {
463 return fRecord->count();
464 }
465 if (fData.get()) {
466 return fData->opCount();
467 }
468 return 0;
469 }
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698