aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-11-24 06:47:48 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-24 06:47:48 -0800
commit932f8669875f5d63b8c04571931e6f4224e66e0b (patch)
tree435c07473abc322e172c998f9fdd628c7e21c03b /tests
parent735f548c51d3824724b621fa836ca828a195d307 (diff)
Create GrOptDrawState directly in the cmd buffer in GrIODB.
Diffstat (limited to 'tests')
-rw-r--r--tests/GLProgramsTest.cpp7
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;