Index: src/gpu/GrInOrderDrawBuffer.cpp |
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp |
index e5d67952147866cfe221b3cfb4ca20263daa7ac5..d61a15ff50efe6d9dea9449216bda42711e22f18 100644 |
--- a/src/gpu/GrInOrderDrawBuffer.cpp |
+++ b/src/gpu/GrInOrderDrawBuffer.cpp |
@@ -733,9 +733,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) { |