Index: tests/GLProgramsTest.cpp |
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp |
index 83b51d6f6689c27c574e64dfbef6ad8029b9ba97..7da1e7201226f84103f990d265cc70c629095d75 100644 |
--- a/tests/GLProgramsTest.cpp |
+++ b/tests/GLProgramsTest.cpp |
@@ -468,12 +468,9 @@ 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(GrOptDrawState::Create(ds, |
- gpu, |
- scissor, |
- &dstCopy, |
- drawType)); |
- if (!ods.get()) { |
+ SkAutoTUnref<GrOptDrawState> ods |
+ SkNEW_ARGS(GrOptDrawState, (ds, gpu, scissor, &dstCopy, drawType)); |
+ if (ods->mustSkip()) { |
continue; |
} |
SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(*ods, drawType, gpu)); |