Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 SkTileGrid_DEFINED | 9 #ifndef SkTileGrid_DEFINED |
| 10 #define SkTileGrid_DEFINED | 10 #define SkTileGrid_DEFINED |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 * Gets the number of insertions | 62 * Gets the number of insertions |
| 63 */ | 63 */ |
| 64 virtual int getCount() const SK_OVERRIDE; | 64 virtual int getCount() const SK_OVERRIDE; |
| 65 | 65 |
| 66 virtual void rewindInserts() SK_OVERRIDE; | 66 virtual void rewindInserts() SK_OVERRIDE; |
| 67 | 67 |
| 68 // Used by search() and in SkTileGridHelper implementations | 68 // Used by search() and in SkTileGridHelper implementations |
| 69 enum { | 69 enum { |
| 70 kTileFinished = -1, | 70 kTileFinished = -1, |
| 71 }; | 71 }; |
| 72 private: | 72 |
| 73 SkTDArray<void*>& tile(int x, int y); | 73 SkTDArray<void*>& tile(int x, int y); |
|
mtklein
2013/12/13 15:24:31
I'm not keen on having to expose this guy. Seems
tfarina
2013/12/13 21:00:08
Done.
| |
| 74 | 74 |
| 75 private: | |
| 75 int fXTileCount, fYTileCount, fTileCount; | 76 int fXTileCount, fYTileCount, fTileCount; |
| 76 SkTileGridPicture::TileGridInfo fInfo; | 77 SkTileGridPicture::TileGridInfo fInfo; |
| 77 SkTDArray<void*>* fTileData; | 78 SkTDArray<void*>* fTileData; |
| 78 int fInsertionCount; | 79 int fInsertionCount; |
| 79 SkIRect fGridBounds; | 80 SkIRect fGridBounds; |
| 80 SkTileGridNextDatumFunctionPtr fNextDatumFunction; | 81 SkTileGridNextDatumFunctionPtr fNextDatumFunction; |
| 81 | 82 |
| 82 friend class TileGridTest; | |
| 83 typedef SkBBoxHierarchy INHERITED; | 83 typedef SkBBoxHierarchy INHERITED; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 /** | 86 /** |
| 87 * Generic implementation for SkTileGridNextDatumFunctionPtr. user code may inst antiate | 87 * Generic implementation for SkTileGridNextDatumFunctionPtr. user code may inst antiate |
| 88 * this template to get a valid SkTileGridNextDatumFunction implementation | 88 * this template to get a valid SkTileGridNextDatumFunction implementation |
| 89 * | 89 * |
| 90 * Returns the next element of tileData[i][tileIndices[i]] for all i and advance s | 90 * Returns the next element of tileData[i][tileIndices[i]] for all i and advance s |
| 91 * tileIndices[] past them. The order in which data are returned by successive | 91 * tileIndices[] past them. The order in which data are returned by successive |
| 92 * calls to this method must reflect the order in which the were originally | 92 * calls to this method must reflect the order in which the were originally |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 tileIndices[tile] = SkTileGrid::kTileFinished; | 129 tileIndices[tile] = SkTileGrid::kTileFinished; |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 return minVal; | 133 return minVal; |
| 134 } | 134 } |
| 135 return NULL; | 135 return NULL; |
| 136 } | 136 } |
| 137 | 137 |
| 138 #endif | 138 #endif |
| OLD | NEW |