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

Side by Side Diff: src/core/SkQuadTree.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 #ifndef SkQuadTree_DEFINED 8 #ifndef SkQuadTree_DEFINED
9 #define SkQuadTree_DEFINED 9 #define SkQuadTree_DEFINED
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 /** 66 /**
67 * This gets the insertion count (rather than the node count) 67 * This gets the insertion count (rather than the node count)
68 */ 68 */
69 virtual int getCount() const SK_OVERRIDE { 69 virtual int getCount() const SK_OVERRIDE {
70 return fEntryPool.allocated() - fEntryPool.available(); 70 return fEntryPool.allocated() - fEntryPool.available();
71 } 71 }
72 72
73 virtual void rewindInserts() SK_OVERRIDE; 73 virtual void rewindInserts() SK_OVERRIDE;
74 74
75 virtual size_t bytesUsed() const SK_OVERRIDE;
mtklein 2014/11/17 20:19:31 No more quad tree.
76
75 private: 77 private:
76 struct Entry { 78 struct Entry {
77 Entry() : fData(NULL) {} 79 Entry() : fData(NULL) {}
78 SkIRect fBounds; 80 SkIRect fBounds;
79 void* fData; 81 void* fData;
80 SK_DECLARE_INTERNAL_SLIST_INTERFACE(Entry); 82 SK_DECLARE_INTERNAL_SLIST_INTERFACE(Entry);
81 }; 83 };
82 84
83 static const int kChildCount = 4; 85 static const int kChildCount = 4;
84 86
(...skipping 19 matching lines...) Expand all
104 void insert(Node* node, Entry* entry); 106 void insert(Node* node, Entry* entry);
105 void split(Node* node); 107 void split(Node* node);
106 void search(Node* node, const SkIRect& query, SkTDArray<void*>* results) con st; 108 void search(Node* node, const SkIRect& query, SkTDArray<void*>* results) con st;
107 void clear(Node* node); 109 void clear(Node* node);
108 int getDepth(Node* node) const; 110 int getDepth(Node* node) const;
109 111
110 typedef SkBBoxHierarchy INHERITED; 112 typedef SkBBoxHierarchy INHERITED;
111 }; 113 };
112 114
113 #endif 115 #endif
OLDNEW
« no previous file with comments | « src/core/SkBBoxHierarchy.h ('k') | src/core/SkQuadTree.cpp » ('j') | src/core/SkRTree.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698