Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: tests/GLProgramsTest.cpp

Issue 742853002: Don't use NULL GrOptDrawState to indicate that draw should be skipped. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make bool cast work Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrOptDrawState.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « src/gpu/GrOptDrawState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698