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

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

Issue 490253003: Implement SkPicture::bytesUsed() for SkRecord backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More tweaks for object size Created 6 years, 1 month 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/SkRTree.h ('k') | src/core/SkRecord.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 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 "SkRTree.h" 8 #include "SkRTree.h"
9 9
10 SkRTree::SkRTree(SkScalar aspectRatio) : fCount(0), fAspectRatio(aspectRatio) {} 10 SkRTree::SkRTree(SkScalar aspectRatio) : fCount(0), fAspectRatio(aspectRatio) {}
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 for (int i = 0; i < node->fNumChildren; ++i) { 163 for (int i = 0; i < node->fNumChildren; ++i) {
164 if (SkRect::Intersects(node->fChildren[i].fBounds, query)) { 164 if (SkRect::Intersects(node->fChildren[i].fBounds, query)) {
165 if (0 == node->fLevel) { 165 if (0 == node->fLevel) {
166 results->push(node->fChildren[i].fOpIndex); 166 results->push(node->fChildren[i].fOpIndex);
167 } else { 167 } else {
168 this->search(node->fChildren[i].fSubtree, query, results); 168 this->search(node->fChildren[i].fSubtree, query, results);
169 } 169 }
170 } 170 }
171 } 171 }
172 } 172 }
173
174 size_t SkRTree::bytesUsed() const {
175 size_t byteCount = sizeof(SkRTree);
176
177 byteCount += fNodes.reserved() * sizeof(Node);
178
179 return byteCount;
180 }
OLDNEW
« no previous file with comments | « src/core/SkRTree.h ('k') | src/core/SkRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698