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

Side by Side Diff: src/utils/SkPictureUtils.cpp

Issue 751663002: Remove Picture deletion listeners. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: f 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/gpu/GrLayerCache.cpp ('k') | tests/GpuLayerCacheTest.cpp » ('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 2012 Google Inc. 2 * Copyright 2012 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 "SkBBoxHierarchy.h" 8 #include "SkBBoxHierarchy.h"
9 #include "SkBitmapDevice.h" 9 #include "SkBitmapDevice.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 }; 226 };
227 227
228 size_t SkPictureUtils::ApproximateBytesUsed(const SkPicture* pict) { 228 size_t SkPictureUtils::ApproximateBytesUsed(const SkPicture* pict) {
229 size_t byteCount = sizeof(*pict); 229 size_t byteCount = sizeof(*pict);
230 230
231 byteCount += pict->fRecord->bytesUsed(); 231 byteCount += pict->fRecord->bytesUsed();
232 if (pict->fBBH.get()) { 232 if (pict->fBBH.get()) {
233 byteCount += pict->fBBH->bytesUsed(); 233 byteCount += pict->fBBH->bytesUsed();
234 } 234 }
235 byteCount +=
236 pict->fDeletionListeners.reserved() * sizeof(SkPicture::DeletionListener *) +
237 pict->fDeletionListeners.count() * sizeof(SkPicture::DeletionListener);
238
239 MeasureRecords visitor; 235 MeasureRecords visitor;
240 for (unsigned curOp = 0; curOp < pict->fRecord->count(); curOp++) { 236 for (unsigned curOp = 0; curOp < pict->fRecord->count(); curOp++) {
241 byteCount += pict->fRecord->visit<size_t>(curOp, visitor); 237 byteCount += pict->fRecord->visit<size_t>(curOp, visitor);
242 } 238 }
243 239
244 return byteCount; 240 return byteCount;
245 } 241 }
OLDNEW
« no previous file with comments | « src/gpu/GrLayerCache.cpp ('k') | tests/GpuLayerCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698