diff options
author | 2014-11-20 09:56:11 -0800 | |
---|---|---|
committer | 2014-11-20 09:56:11 -0800 | |
commit | b03c4a35bd319d883925a39871b4972ff1b2c0cc (patch) | |
tree | cf06d14e7274276bc830822f6cd28140acdc811f /tests | |
parent | 08d1fccf6eeec0a9fd5421e59e4d05daccf6e339 (diff) |
Don't use NULL GrOptDrawState to indicate that draw should be skipped.
Review URL: https://codereview.chromium.org/742853002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GLProgramsTest.cpp | 9 |
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)); |