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

Side by Side Diff: src/gpu/GrPathRendererChain.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrPathRenderer.h ('k') | src/gpu/GrPictureUtils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrPathRendererChain.h" 10 #include "GrPathRendererChain.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 59
60 for (int i = 0; i < fChain.count(); ++i) { 60 for (int i = 0; i < fChain.count(); ++i) {
61 if (fChain[i]->canDrawPath(path, stroke, target, antiAlias)) { 61 if (fChain[i]->canDrawPath(path, stroke, target, antiAlias)) {
62 if (GrPathRenderer::kNoSupport_StencilSupport != minStencilSupport) { 62 if (GrPathRenderer::kNoSupport_StencilSupport != minStencilSupport) {
63 GrPathRenderer::StencilSupport support = fChain[i]->getStencilSu pport(path, 63 GrPathRenderer::StencilSupport support = fChain[i]->getStencilSu pport(path,
64 stroke, 64 stroke,
65 target); 65 target);
66 if (support < minStencilSupport) { 66 if (support < minStencilSupport) {
67 continue; 67 continue;
68 } else if (NULL != stencilSupport) { 68 } else if (stencilSupport) {
69 *stencilSupport = support; 69 *stencilSupport = support;
70 } 70 }
71 } 71 }
72 return fChain[i]; 72 return fChain[i];
73 } 73 }
74 } 74 }
75 return NULL; 75 return NULL;
76 } 76 }
77 77
78 void GrPathRendererChain::init() { 78 void GrPathRendererChain::init() {
79 SkASSERT(!fInit); 79 SkASSERT(!fInit);
80 GrGpu* gpu = fOwner->getGpu(); 80 GrGpu* gpu = fOwner->getGpu();
81 bool twoSided = gpu->caps()->twoSidedStencilSupport(); 81 bool twoSided = gpu->caps()->twoSidedStencilSupport();
82 bool wrapOp = gpu->caps()->stencilWrapOpsSupport(); 82 bool wrapOp = gpu->caps()->stencilWrapOpsSupport();
83 GrPathRenderer::AddPathRenderers(fOwner, this); 83 GrPathRenderer::AddPathRenderers(fOwner, this);
84 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer, 84 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer,
85 (twoSided, wrapOp)))->unref(); 85 (twoSided, wrapOp)))->unref();
86 fInit = true; 86 fInit = true;
87 } 87 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathRenderer.h ('k') | src/gpu/GrPictureUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698