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

Side by Side Diff: src/gpu/GrPathRenderer.h

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/GrPaint.cpp ('k') | src/gpu/GrPathRendererChain.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 #ifndef GrPathRenderer_DEFINED 9 #ifndef GrPathRenderer_DEFINED
10 #define GrPathRenderer_DEFINED 10 #define GrPathRenderer_DEFINED
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 SkASSERT(!path.isEmpty()); 136 SkASSERT(!path.isEmpty());
137 SkASSERT(kNoSupport_StencilSupport != this->getStencilSupport(path, stro ke, target)); 137 SkASSERT(kNoSupport_StencilSupport != this->getStencilSupport(path, stro ke, target));
138 this->onStencilPath(path, stroke, target); 138 this->onStencilPath(path, stroke, target);
139 } 139 }
140 140
141 // Helper for determining if we can treat a thin stroke as a hairline w/ cov erage. 141 // Helper for determining if we can treat a thin stroke as a hairline w/ cov erage.
142 // If we can, we draw lots faster (raster device does this same test). 142 // If we can, we draw lots faster (raster device does this same test).
143 static bool IsStrokeHairlineOrEquivalent(const SkStrokeRec& stroke, const Sk Matrix& matrix, 143 static bool IsStrokeHairlineOrEquivalent(const SkStrokeRec& stroke, const Sk Matrix& matrix,
144 SkScalar* outCoverage) { 144 SkScalar* outCoverage) {
145 if (stroke.isHairlineStyle()) { 145 if (stroke.isHairlineStyle()) {
146 if (NULL != outCoverage) { 146 if (outCoverage) {
147 *outCoverage = SK_Scalar1; 147 *outCoverage = SK_Scalar1;
148 } 148 }
149 return true; 149 return true;
150 } 150 }
151 return stroke.getStyle() == SkStrokeRec::kStroke_Style && 151 return stroke.getStyle() == SkStrokeRec::kStroke_Style &&
152 SkDrawTreatAAStrokeAsHairline(stroke.getWidth(), matrix, outCoverage ); 152 SkDrawTreatAAStrokeAsHairline(stroke.getWidth(), matrix, outCoverage );
153 } 153 }
154 154
155 protected: 155 protected:
156 /** 156 /**
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 SkRect* bounds) { 204 SkRect* bounds) {
205 GetPathDevBounds(path, device->width(), device->height(), matrix, bounds ); 205 GetPathDevBounds(path, device->width(), device->height(), matrix, bounds );
206 } 206 }
207 207
208 private: 208 private:
209 209
210 typedef SkRefCnt INHERITED; 210 typedef SkRefCnt INHERITED;
211 }; 211 };
212 212
213 #endif 213 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPaint.cpp ('k') | src/gpu/GrPathRendererChain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698