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

Side by Side Diff: src/gpu/GrStrokeInfo.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/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/GrTemplates.h » ('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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrStrokeInfo_DEFINED 8 #ifndef GrStrokeInfo_DEFINED
9 #define GrStrokeInfo_DEFINED 9 #define GrStrokeInfo_DEFINED
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 SkStrokeRec* getStrokeRecPtr() { return &fStroke; } 49 SkStrokeRec* getStrokeRecPtr() { return &fStroke; }
50 50
51 void setFillStyle() { fStroke.setFillStyle(); } 51 void setFillStyle() { fStroke.setFillStyle(); }
52 52
53 /* 53 /*
54 * This functions takes in a patheffect and fills in fDashInfo with the vari ous dashing 54 * This functions takes in a patheffect and fills in fDashInfo with the vari ous dashing
55 * information if the path effect is a Dash type. Returns true if the path e ffect is a 55 * information if the path effect is a Dash type. Returns true if the path e ffect is a
56 * dashed effect and we are stroking, otherwise it retruns false. 56 * dashed effect and we are stroking, otherwise it retruns false.
57 */ 57 */
58 bool setDashInfo(const SkPathEffect* pe) { 58 bool setDashInfo(const SkPathEffect* pe) {
59 if (NULL != pe && !fStroke.isFillStyle()) { 59 if (pe && !fStroke.isFillStyle()) {
60 fDashInfo.fIntervals = NULL; 60 fDashInfo.fIntervals = NULL;
61 fDashType = pe->asADash(&fDashInfo); 61 fDashType = pe->asADash(&fDashInfo);
62 if (SkPathEffect::kDash_DashType == fDashType) { 62 if (SkPathEffect::kDash_DashType == fDashType) {
63 fIntervals.reset(fDashInfo.fCount); 63 fIntervals.reset(fDashInfo.fCount);
64 fDashInfo.fIntervals = fIntervals.get(); 64 fDashInfo.fIntervals = fIntervals.get();
65 pe->asADash(&fDashInfo); 65 pe->asADash(&fDashInfo);
66 return true; 66 return true;
67 } 67 }
68 } 68 }
69 return false; 69 return false;
(...skipping 20 matching lines...) Expand all
90 this->setDashInfo(pe); 90 this->setDashInfo(pe);
91 } 91 }
92 92
93 SkStrokeRec fStroke; 93 SkStrokeRec fStroke;
94 SkPathEffect::DashType fDashType; 94 SkPathEffect::DashType fDashType;
95 SkPathEffect::DashInfo fDashInfo; 95 SkPathEffect::DashInfo fDashInfo;
96 SkAutoSTArray<2, SkScalar> fIntervals; 96 SkAutoSTArray<2, SkScalar> fIntervals;
97 }; 97 };
98 98
99 #endif 99 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/GrTemplates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698