Index: src/gpu/GrInOrderDrawBuffer.cpp |
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp |
index 55331748531a67749c1a1c4ef2f4534d9fffa939..83b9701f09207d83c583f4f2515324be1d448a4d 100644 |
--- a/src/gpu/GrInOrderDrawBuffer.cpp |
+++ b/src/gpu/GrInOrderDrawBuffer.cpp |
@@ -394,7 +394,7 @@ void GrInOrderDrawBuffer::onFlush() { |
// Updated every time we find a set state cmd to reflect the current state in the playback |
// stream. |
- const GrOptDrawState* currentOptState = NULL; |
+ GrOptDrawState* currentOptState = NULL; |
while (iter.next()) { |
GrGpuTraceMarker newMarker("", -1); |
@@ -409,6 +409,7 @@ void GrInOrderDrawBuffer::onFlush() { |
if (kSetState_Cmd == strip_trace_bit(iter->fType)) { |
SetState* ss = reinterpret_cast<SetState*>(iter.get()); |
currentOptState = &ss->fState; |
+ currentOptState->finalize(this->getGpu()); |
} else { |
iter->execute(this, currentOptState); |
} |
@@ -486,7 +487,8 @@ bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrDrawState& ds, |
const GrClipMaskManager::ScissorState& scissor, |
const GrDeviceCoordTexture* dstCopy) { |
SetState* ss = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, SetState, |
- (ds, this->getGpu(), scissor, dstCopy, drawType)); |
+ (ds, *this->getGpu()->caps(), scissor, dstCopy, |
+ drawType)); |
if (ss->fState.mustSkip()) { |
fCmdBuffer.pop_back(); |
return false; |