Index: tests/GLProgramsTest.cpp |
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp |
index 7da1e7201226f84103f990d265cc70c629095d75..a6b2ee397dd262a194f94c6b0eba0d6f3e04f452 100644 |
--- a/tests/GLProgramsTest.cpp |
+++ b/tests/GLProgramsTest.cpp |
@@ -468,12 +468,11 @@ bool GrDrawTarget::programUnitTest(int maxStages) { |
// create optimized draw state, setup readDst texture if required, and build a descriptor |
// and program. ODS creation can fail, so we have to check |
- SkAutoTUnref<GrOptDrawState> ods |
- SkNEW_ARGS(GrOptDrawState, (ds, gpu, scissor, &dstCopy, drawType)); |
- if (ods->mustSkip()) { |
+ GrOptDrawState ods(ds, gpu, scissor, &dstCopy, drawType); |
+ if (ods.mustSkip()) { |
continue; |
} |
- SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(*ods, drawType, gpu)); |
+ SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(ods, drawType, gpu)); |
if (NULL == program.get()) { |
SkDebugf("Failed to create program!"); |
return false; |