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

Side by Side Diff: src/gpu/GrBatchFlushState.h

Issue 1430403002: Disable preemptive batch preparation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Disabled pre-emptive preparation Created 5 years, 1 month 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 | « src/gpu/GrBatchAtlas.cpp ('k') | src/gpu/GrBatchFlushState.cpp » ('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 #ifndef GrBatchBuffer_DEFINED 8 #ifndef GrBatchBuffer_DEFINED
9 #define GrBatchBuffer_DEFINED 9 #define GrBatchBuffer_DEFINED
10 10
(...skipping 26 matching lines...) Expand all
37 return fGpu->writePixels(texture, left, top, width, height, config, buff er, rowBytes); 37 return fGpu->writePixels(texture, left, top, width, height, config, buff er, rowBytes);
38 } 38 }
39 39
40 private: 40 private:
41 GrGpu* fGpu; 41 GrGpu* fGpu;
42 }; 42 };
43 43
44 /** Tracks the state across all the GrBatches in a GrDrawTarget flush. */ 44 /** Tracks the state across all the GrBatches in a GrDrawTarget flush. */
45 class GrBatchFlushState { 45 class GrBatchFlushState {
46 public: 46 public:
47 GrBatchFlushState(GrGpu*, GrResourceProvider*, GrBatchToken lastFlushedToken ); 47 GrBatchFlushState(GrGpu*, GrResourceProvider*);
48 48
49 ~GrBatchFlushState() { this->reset(); } 49 ~GrBatchFlushState() { this->reset(); }
50 50
51 void advanceToken() { ++fCurrentToken; } 51 void advanceToken() { ++fCurrentToken; }
52 52
53 void advanceLastFlushedToken() { ++fLastFlushedToken; } 53 void advanceLastFlushedToken() { ++fLastFlushedToken; }
54 54
55 /** Inserts an upload to be executred after all batches in the flush prepare d their draws 55 /** Inserts an upload to be executred after all batches in the flush prepare d their draws
56 but before the draws are executed to the backend 3D API. */ 56 but before the draws are executed to the backend 3D API. */
57 void addASAPUpload(GrBatchUploader* upload) { 57 void addASAPUpload(GrBatchUploader* upload) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void putBackVertices(int vertices, size_t vertexStride) { 185 void putBackVertices(int vertices, size_t vertexStride) {
186 this->state()->putBackVertexSpace(vertices * vertexStride); 186 this->state()->putBackVertexSpace(vertices * vertexStride);
187 } 187 }
188 188
189 private: 189 private:
190 GrVertexBatch* vertexBatch() { return static_cast<GrVertexBatch*>(this->batc h()); } 190 GrVertexBatch* vertexBatch() { return static_cast<GrVertexBatch*>(this->batc h()); }
191 typedef GrDrawBatch::Target INHERITED; 191 typedef GrDrawBatch::Target INHERITED;
192 }; 192 };
193 193
194 #endif 194 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrBatchAtlas.cpp ('k') | src/gpu/GrBatchFlushState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698