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

Unified Diff: src/gpu/GrBatchFlushState.h

Issue 1386463004: Incrementally flush GrDrawTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixed Created 5 years, 2 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/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBatchFlushState.h
diff --git a/src/gpu/GrBatchFlushState.h b/src/gpu/GrBatchFlushState.h
index 5e68e282858e8fe4d49225b5f858955362212232..f9b304d6a25ad646477e45af5be49d9353bd68b6 100644
--- a/src/gpu/GrBatchFlushState.h
+++ b/src/gpu/GrBatchFlushState.h
@@ -46,7 +46,7 @@ class GrBatchFlushState {
public:
GrBatchFlushState(GrGpu*, GrResourceProvider*, GrBatchToken lastFlushedToken);
- ~GrBatchFlushState() { SkASSERT(fLastFlushedToken == fCurrentToken); }
+ ~GrBatchFlushState() { this->reset(); }
void advanceToken() { ++fCurrentToken; }
@@ -99,6 +99,11 @@ public:
GrGpu* gpu() { return fGpu; }
+ void reset() {
+ fVertexPool.reset();
+ fIndexPool.reset();
+ }
+
private:
GrGpu* fGpu;
GrBatchUploader::TextureUploader fUploader;
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698