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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.h
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index bf9237d4268896b2793f9c4671253653c108443b..9ef4e2fc64a8c7b488776d05c99861e3d71da4bb 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -320,7 +320,16 @@ private:
// TODO hack until batch is everywhere
DrawBatch* fDrawBatch;
- void closeBatch();
+ // This will go away when everything uses batch. However, in the short term anything which
+ // might be put into the GrInOrderDrawBuffer needs to make sure it closes the last batch
+ void closeBatch() {
+ if (fDrawBatch) {
+ fBatchTarget.resetNumberOfDraws();
+ fDrawBatch->execute(this, fPrevState);
+ fDrawBatch->fBatch->setNumberOfDraws(fBatchTarget.numberOfDraws());
+ fDrawBatch = NULL;
+ }
+ }
typedef GrFlushToGpuDrawTarget INHERITED;
};
« 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