Chromium Code Reviews| Index: src/gpu/GrDrawTarget.cpp |
| diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp |
| index f42ee111ce351b1b6e26190581849dcca1cbd579..1c996c566b12dbbbe42ab7357d060d12f61afcc7 100644 |
| --- a/src/gpu/GrDrawTarget.cpp |
| +++ b/src/gpu/GrDrawTarget.cpp |
| @@ -32,13 +32,15 @@ |
| //////////////////////////////////////////////////////////////////////////////// |
| -GrDrawTarget::GrDrawTarget(GrGpu* gpu, GrResourceProvider* resourceProvider) |
| +GrDrawTarget::GrDrawTarget(GrGpu* gpu, GrResourceProvider* resourceProvider, |
| + const Options& options) |
| : fGpu(SkRef(gpu)) |
| , fResourceProvider(resourceProvider) |
| , fFlushState(fGpu, fResourceProvider, 0) |
| , fFlushing(false) |
| , fFirstUnpreparedBatch(0) |
| - , fFlags(0) { |
| + , fFlags(0) |
| + , fOptions(options) { |
| // TODO: Stop extracting the context (currently needed by GrClipMaskManager) |
| fContext = fGpu->getContext(); |
| fClipMaskManager.reset(new GrClipMaskManager(this)); |
| @@ -524,6 +526,9 @@ void GrDrawTarget::recordBatch(GrBatch* batch) { |
| SkASSERT(fBatches.count() - kMaxLookback - fFirstUnpreparedBatch == 1); |
| fBatches[fFirstUnpreparedBatch++]->prepare(&fFlushState); |
| } |
| + if (fOptions.fImmediateMode) { |
|
joshualitt
2015/10/23 15:41:46
In immediate mode we also want to set maxCandidate
|
| + this->flush(); |
| + } |
| } |
| /////////////////////////////////////////////////////////////////////////////// |