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

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

Issue 622773003: Demote getCount, getDepth, and clear to RTree-only methods. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: dox Created 6 years, 2 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
« no previous file with comments | « src/core/SkRTree.h ('k') | src/core/SkTileGrid.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 #ifndef SkTileGrid_DEFINED 8 #ifndef SkTileGrid_DEFINED
9 #define SkTileGrid_DEFINED 9 #define SkTileGrid_DEFINED
10 10
(...skipping 20 matching lines...) Expand all
31 virtual void insert(unsigned opIndex, const SkRect& bounds, bool) SK_OVERRID E; 31 virtual void insert(unsigned opIndex, const SkRect& bounds, bool) SK_OVERRID E;
32 32
33 virtual void flushDeferredInserts() SK_OVERRIDE {}; 33 virtual void flushDeferredInserts() SK_OVERRIDE {};
34 34
35 /** 35 /**
36 * Populate 'results' with opIndexes corresponding to bounding boxes that in tersect 'query'. 36 * Populate 'results' with opIndexes corresponding to bounding boxes that in tersect 'query'.
37 * This will be fastest if the query is an exact match to a single grid tile . 37 * This will be fastest if the query is an exact match to a single grid tile .
38 */ 38 */
39 virtual void search(const SkRect& query, SkTDArray<unsigned>* results) const SK_OVERRIDE; 39 virtual void search(const SkRect& query, SkTDArray<unsigned>* results) const SK_OVERRIDE;
40 40
41 virtual void clear() SK_OVERRIDE;
42
43 virtual int getCount() const SK_OVERRIDE { return fCount; }
44
45 virtual int getDepth() const SK_OVERRIDE { return -1; }
46
47 // For testing. 41 // For testing.
48 int tileCount(int x, int y) { return fTiles[y * fXTiles + x].count(); } 42 int tileCount(int x, int y) { return fTiles[y * fXTiles + x].count(); }
49 43
50 private: 44 private:
51 const int fXTiles, fYTiles; 45 const int fXTiles, fYTiles;
52 SkTileGridFactory::TileGridInfo fInfo; 46 SkTileGridFactory::TileGridInfo fInfo;
53 size_t fCount;
54 47
55 // (fXTiles * fYTiles) SkTDArrays, each listing ops overlapping that tile in order. 48 // (fXTiles * fYTiles) SkTDArrays, each listing ops overlapping that tile in order.
56 SkTDArray<unsigned>* fTiles; 49 SkTDArray<unsigned>* fTiles;
57 50
58 typedef SkBBoxHierarchy INHERITED; 51 typedef SkBBoxHierarchy INHERITED;
59 }; 52 };
60 53
61 #endif 54 #endif
OLDNEW
« no previous file with comments | « src/core/SkRTree.h ('k') | src/core/SkTileGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698