OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 GrAtlas_DEFINED | 9 #ifndef GrAtlas_DEFINED |
10 #define GrAtlas_DEFINED | 10 #define GrAtlas_DEFINED |
11 | 11 |
12 | 12 |
13 #include "SkPoint.h" | |
14 #include "GrTexture.h" | 13 #include "GrTexture.h" |
15 #include "GrDrawTarget.h" | 14 #include "GrDrawTarget.h" |
| 15 #include "SkPoint.h" |
| 16 #include "SkTInternalLList.h" |
16 | 17 |
17 class GrGpu; | 18 class GrGpu; |
18 class GrRectanizer; | 19 class GrRectanizer; |
19 class GrAtlas; | 20 class GrAtlas; |
20 | 21 |
21 // The backing GrTexture for a set of GrAtlases is broken into a spatial grid of
GrPlots. When | 22 // The backing GrTexture for a set of GrAtlases is broken into a spatial grid of
GrPlots. When |
22 // a GrAtlas needs space on the texture, it requests a GrPlot. Each GrAtlas can
claim one | 23 // a GrAtlas needs space on the texture, it requests a GrPlot. Each GrAtlas can
claim one |
23 // or more GrPlots. The GrPlots keep track of subimage placement via their GrRec
tanizer. Once a | 24 // or more GrPlots. The GrPlots keep track of subimage placement via their GrRec
tanizer. Once a |
24 // GrPlot is "full" (i.e. there is no room for the new subimage according to the
GrRectanizer), the | 25 // GrPlot is "full" (i.e. there is no room for the new subimage according to the
GrRectanizer), the |
25 // GrAtlas can request a new GrPlot via GrAtlas::addToAtlas(). | 26 // GrAtlas can request a new GrPlot via GrAtlas::addToAtlas(). |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 int fNumPlotsY; | 124 int fNumPlotsY; |
124 bool fBatchUploads; | 125 bool fBatchUploads; |
125 | 126 |
126 // allocated array of GrPlots | 127 // allocated array of GrPlots |
127 GrPlot* fPlotArray; | 128 GrPlot* fPlotArray; |
128 // LRU list of GrPlots (MRU at head - LRU at tail) | 129 // LRU list of GrPlots (MRU at head - LRU at tail) |
129 GrPlotList fPlotList; | 130 GrPlotList fPlotList; |
130 }; | 131 }; |
131 | 132 |
132 #endif | 133 #endif |
OLD | NEW |