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

Unified Diff: src/gpu/GrDrawTarget.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index e13d9b81a7a51b5281cf4384c25341c2a2c162bb..3aa7a540f8e89cc6dba35bc716d5403fdd10775b 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -36,9 +36,8 @@ GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* r
const Options& options)
: fGpu(SkRef(gpu))
, fResourceProvider(resourceProvider)
- , fFlushState(fGpu, fResourceProvider, 0)
+ , fFlushState(fGpu, fResourceProvider)
, fFlushing(false)
- , fFirstUnpreparedBatch(0)
, fFlags(0)
, fOptions(options)
, fRenderTarget(rt) {
@@ -190,8 +189,8 @@ void GrDrawTarget::flush() {
this->makeClosed();
// Loop over the batches that haven't yet generated their geometry
- for (; fFirstUnpreparedBatch < fBatches.count(); ++fFirstUnpreparedBatch) {
- fBatches[fFirstUnpreparedBatch]->prepare(&fFlushState);
+ for (int i = 0; i < fBatches.count(); ++i) {
+ fBatches[i]->prepare(&fFlushState);
}
// Upload all data to the GPU
@@ -209,7 +208,6 @@ void GrDrawTarget::flush() {
}
void GrDrawTarget::reset() {
- fFirstUnpreparedBatch = 0;
fBatches.reset();
fFlushState.reset();
}
@@ -522,10 +520,6 @@ void GrDrawTarget::recordBatch(GrBatch* batch) {
GrBATCH_INFO("\t\tFirstBatch\n");
}
fBatches.push_back().reset(SkRef(batch));
- if (fBatches.count() > kMaxLookback) {
- SkASSERT(fBatches.count() - kMaxLookback - fFirstUnpreparedBatch == 1);
- fBatches[fFirstUnpreparedBatch++]->prepare(&fFlushState);
- }
if (fOptions.fImmediateMode) {
this->flush();
}
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698