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

Side by Side Diff: src/gpu/GrBatchAtlas.cpp

Issue 1825393002: Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: asserts Created 4 years, 9 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 | « include/gpu/GrTypesPriv.h ('k') | src/gpu/GrBatchFlushState.h » ('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 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
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 }
OLDNEW
« no previous file with comments | « include/gpu/GrTypesPriv.h ('k') | src/gpu/GrBatchFlushState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698