Index: src/gpu/GrInOrderDrawBuffer.cpp |
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp |
index cb44c2bb459d933f176e1adae7caefe2a2aba7e2..2f90373c339f581f0b1adf81e4dc251ec04f522a 100644 |
--- a/src/gpu/GrInOrderDrawBuffer.cpp |
+++ b/src/gpu/GrInOrderDrawBuffer.cpp |
@@ -727,9 +727,9 @@ bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrDrawState& ds, |
GrGpu::DrawType drawType, |
const GrClipMaskManager::ScissorState& scissor, |
const GrDeviceCoordTexture* dstCopy) { |
- SkAutoTUnref<GrOptDrawState> optState(GrOptDrawState::Create(ds, fDstGpu, scissor, dstCopy, |
- drawType)); |
- if (!optState) { |
+ SkAutoTUnref<GrOptDrawState> optState( |
+ SkNEW_ARGS(GrOptDrawState, (ds, fDstGpu, scissor, dstCopy, drawType))); |
+ if (optState->mustSkip()) { |
return false; |
} |
if (!fLastState || *optState != *fLastState) { |