aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-11-20 09:56:11 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-20 09:56:11 -0800
commitb03c4a35bd319d883925a39871b4972ff1b2c0cc (patch)
treecf06d14e7274276bc830822f6cd28140acdc811f /tests
parent08d1fccf6eeec0a9fd5421e59e4d05daccf6e339 (diff)
Don't use NULL GrOptDrawState to indicate that draw should be skipped.
Diffstat (limited to 'tests')
-rw-r--r--tests/GLProgramsTest.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 83b51d6f66..7da1e72012 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));