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

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

Issue 12817011: Fixing SkPicture command pattern optimizations to make them work correctly with bounding box hierar… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkPictureStateTree.cpp ('k') | src/core/SkRTree.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 /* 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 virtual void clear(); 81 virtual void clear();
82 bool isEmpty() const { return 0 == fCount; } 82 bool isEmpty() const { return 0 == fCount; }
83 int getDepth() const { return this->isEmpty() ? 0 : fRoot.fChild.subtree->fL evel + 1; } 83 int getDepth() const { return this->isEmpty() ? 0 : fRoot.fChild.subtree->fL evel + 1; }
84 84
85 /** 85 /**
86 * This gets the insertion count (rather than the node count) 86 * This gets the insertion count (rather than the node count)
87 */ 87 */
88 virtual int getCount() const { return fCount; } 88 virtual int getCount() const { return fCount; }
89 89
90 virtual void rewindInserts() SK_OVERRIDE;
91
90 private: 92 private:
91 93
92 struct Node; 94 struct Node;
93 95
94 /** 96 /**
95 * A branch of the tree, this may contain a pointer to another interior node , or a data value 97 * A branch of the tree, this may contain a pointer to another interior node , or a data value
96 */ 98 */
97 struct Branch { 99 struct Branch {
98 union { 100 union {
99 Node* subtree; 101 Node* subtree;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 SkChunkAlloc fNodes; 184 SkChunkAlloc fNodes;
183 SkTDArray<Branch> fDeferredInserts; 185 SkTDArray<Branch> fDeferredInserts;
184 SkScalar fAspectRatio; 186 SkScalar fAspectRatio;
185 187
186 Node* allocateNode(uint16_t level); 188 Node* allocateNode(uint16_t level);
187 189
188 typedef SkBBoxHierarchy INHERITED; 190 typedef SkBBoxHierarchy INHERITED;
189 }; 191 };
190 192
191 #endif 193 #endif
OLDNEW
« no previous file with comments | « src/core/SkPictureStateTree.cpp ('k') | src/core/SkRTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698