OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #include "GrBatchAtlas.h" | 8 #include "GrBatchAtlas.h" |
9 #include "GrBatchFlushState.h" | 9 #include "GrBatchFlushState.h" |
10 #include "GrRectanizer.h" | 10 #include "GrRectanizer.h" |
11 #include "GrTracing.h" | 11 #include "GrTracing.h" |
| 12 #include "GrVertexBuffer.h" |
12 | 13 |
13 //////////////////////////////////////////////////////////////////////////////// | 14 //////////////////////////////////////////////////////////////////////////////// |
14 | 15 |
15 GrBatchAtlas::BatchPlot::BatchPlot(int index, uint64_t genID, int offX, int offY
, int width, | 16 GrBatchAtlas::BatchPlot::BatchPlot(int index, uint64_t genID, int offX, int offY
, int width, |
16 int height, GrPixelConfig config) | 17 int height, GrPixelConfig config) |
17 : fLastUpload(0) | 18 : fLastUpload(0) |
18 , fLastUse(0) | 19 , fLastUse(0) |
19 , fIndex(index) | 20 , fIndex(index) |
20 , fGenID(genID) | 21 , fGenID(genID) |
21 , fID(CreateId(fIndex, fGenID)) | 22 , fID(CreateId(fIndex, fGenID)) |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // Note that this plot will be uploaded inline with the draws whereas the | 255 // Note that this plot will be uploaded inline with the draws whereas the |
255 // one it displaced most likely was uploaded asap. | 256 // one it displaced most likely was uploaded asap. |
256 newPlot->setLastUploadToken(batchTarget->currentToken()); | 257 newPlot->setLastUploadToken(batchTarget->currentToken()); |
257 SkAutoTUnref<GrPlotUploader> uploader(new GrPlotUploader(newPlot, fTexture))
; | 258 SkAutoTUnref<GrPlotUploader> uploader(new GrPlotUploader(newPlot, fTexture))
; |
258 batchTarget->upload(uploader); | 259 batchTarget->upload(uploader); |
259 *id = newPlot->id(); | 260 *id = newPlot->id(); |
260 | 261 |
261 fAtlasGeneration++; | 262 fAtlasGeneration++; |
262 return true; | 263 return true; |
263 } | 264 } |
OLD | NEW |