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

Unified Diff: src/gpu/GrInOrderDrawBuffer.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: 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 | « no previous file | src/gpu/GrOptDrawState.h » ('j') | src/gpu/GrOptDrawState.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.cpp
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index e5d67952147866cfe221b3cfb4ca20263daa7ac5..d61a15ff50efe6d9dea9449216bda42711e22f18 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -733,9 +733,9 @@ bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrDrawState& ds,
GrGpu::DrawType drawType,
const GrClipMaskManager::ScissorState& scissor,
const GrDeviceCoordTexture* dstCopy) {
- SkAutoTUnref<GrOptDrawState> optState(GrOptDrawState::Create(ds, fDstGpu, scissor, dstCopy,
- drawType));
- if (!optState) {
+ SkAutoTUnref<GrOptDrawState> optState(
+ SkNEW_ARGS(GrOptDrawState, (ds, fDstGpu, scissor, dstCopy, drawType)));
+ if (optState->mustSkip()) {
return false;
}
if (!fLastState || *optState != *fLastState) {
« no previous file with comments | « no previous file | src/gpu/GrOptDrawState.h » ('j') | src/gpu/GrOptDrawState.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698