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

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

Issue 865153005: simple fix to close batches on anything push to the GrIODB recorder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | src/gpu/GrInOrderDrawBuffer.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 2011 Google Inc. 2 * Copyright 2011 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 GrInOrderDrawBuffer_DEFINED 8 #ifndef GrInOrderDrawBuffer_DEFINED
9 #define GrInOrderDrawBuffer_DEFINED 9 #define GrInOrderDrawBuffer_DEFINED
10 10
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 CmdBuffer fCmdBuffer; 313 CmdBuffer fCmdBuffer;
314 SetState* fPrevState; 314 SetState* fPrevState;
315 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; 315 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
316 SkTDArray<char> fPathIndexBuffer; 316 SkTDArray<char> fPathIndexBuffer;
317 SkTDArray<float> fPathTransformBuffer; 317 SkTDArray<float> fPathTransformBuffer;
318 uint32_t fDrawID; 318 uint32_t fDrawID;
319 GrBatchTarget fBatchTarget; 319 GrBatchTarget fBatchTarget;
320 // TODO hack until batch is everywhere 320 // TODO hack until batch is everywhere
321 DrawBatch* fDrawBatch; 321 DrawBatch* fDrawBatch;
322 322
323 void closeBatch(); 323 // This will go away when everything uses batch. However, in the short term anything which
324 // might be put into the GrInOrderDrawBuffer needs to make sure it closes th e last batch
325 void closeBatch() {
326 if (fDrawBatch) {
327 fBatchTarget.resetNumberOfDraws();
328 fDrawBatch->execute(this, fPrevState);
329 fDrawBatch->fBatch->setNumberOfDraws(fBatchTarget.numberOfDraws());
330 fDrawBatch = NULL;
331 }
332 }
324 333
325 typedef GrFlushToGpuDrawTarget INHERITED; 334 typedef GrFlushToGpuDrawTarget INHERITED;
326 }; 335 };
327 336
328 #endif 337 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698