diff options
author | 2014-11-24 06:47:48 -0800 | |
---|---|---|
committer | 2014-11-24 06:47:48 -0800 | |
commit | 932f8669875f5d63b8c04571931e6f4224e66e0b (patch) | |
tree | 435c07473abc322e172c998f9fdd628c7e21c03b /tests | |
parent | 735f548c51d3824724b621fa836ca828a195d307 (diff) |
Create GrOptDrawState directly in the cmd buffer in GrIODB.
Review URL: https://codereview.chromium.org/746243002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GLProgramsTest.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 7da1e72012..a6b2ee397d 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; |