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