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

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

Issue 490253003: Implement SkPicture::bytesUsed() for SkRecord backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move to SkPictureUtils, start unit test 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
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 #ifndef SkRTree_DEFINED 9 #ifndef SkRTree_DEFINED
10 #define SkRTree_DEFINED 10 #define SkRTree_DEFINED
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return this->isEmpty() ? 0 : fRoot.fChild.subtree->fLevel + 1; 89 return this->isEmpty() ? 0 : fRoot.fChild.subtree->fLevel + 1;
90 } 90 }
91 91
92 /** 92 /**
93 * This gets the insertion count (rather than the node count) 93 * This gets the insertion count (rather than the node count)
94 */ 94 */
95 virtual int getCount() const SK_OVERRIDE { return fCount; } 95 virtual int getCount() const SK_OVERRIDE { return fCount; }
96 96
97 virtual void rewindInserts() SK_OVERRIDE; 97 virtual void rewindInserts() SK_OVERRIDE;
98 98
99 virtual size_t bytesUsed() const SK_OVERRIDE;
100
99 private: 101 private:
100 102
101 struct Node; 103 struct Node;
102 104
103 /** 105 /**
104 * A branch of the tree, this may contain a pointer to another interior node , or a data value 106 * A branch of the tree, this may contain a pointer to another interior node , or a data value
105 */ 107 */
106 struct Branch { 108 struct Branch {
107 union { 109 union {
108 Node* subtree; 110 Node* subtree;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 SkTDArray<Branch> fDeferredInserts; 194 SkTDArray<Branch> fDeferredInserts;
193 SkScalar fAspectRatio; 195 SkScalar fAspectRatio;
194 bool fSortWhenBulkLoading; 196 bool fSortWhenBulkLoading;
195 197
196 Node* allocateNode(uint16_t level); 198 Node* allocateNode(uint16_t level);
197 199
198 typedef SkBBoxHierarchy INHERITED; 200 typedef SkBBoxHierarchy INHERITED;
199 }; 201 };
200 202
201 #endif 203 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698