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

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

Issue 2185063002: require semi at the end of SkASSERT and friends (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: refactor do while as macro Created 4 years, 4 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/GrSoftwarePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.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 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 #include "GrStyle.h" 8 #include "GrStyle.h"
9 #include "SkDashPathPriv.h" 9 #include "SkDashPathPriv.h"
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 memcpy(&key[i++], &miter, sizeof(miter)); 98 memcpy(&key[i++], &miter, sizeof(miter));
99 99
100 SkScalar width = style.strokeRec().getWidth(); 100 SkScalar width = style.strokeRec().getWidth();
101 memcpy(&key[i++], &width, sizeof(width)); 101 memcpy(&key[i++], &width, sizeof(width));
102 } 102 }
103 SkASSERT(KeySize(style, apply) == i); 103 SkASSERT(KeySize(style, apply) == i);
104 } 104 }
105 105
106 void GrStyle::initPathEffect(SkPathEffect* pe) { 106 void GrStyle::initPathEffect(SkPathEffect* pe) {
107 SkASSERT(!fPathEffect) 107 SkASSERT(!fPathEffect);
108 SkASSERT(SkPathEffect::kNone_DashType == fDashInfo.fType); 108 SkASSERT(SkPathEffect::kNone_DashType == fDashInfo.fType);
109 SkASSERT(0 == fDashInfo.fIntervals.count()); 109 SkASSERT(0 == fDashInfo.fIntervals.count());
110 if (!pe) { 110 if (!pe) {
111 return; 111 return;
112 } 112 }
113 SkPathEffect::DashInfo info; 113 SkPathEffect::DashInfo info;
114 if (SkPathEffect::kDash_DashType == pe->asADash(&info)) { 114 if (SkPathEffect::kDash_DashType == pe->asADash(&info)) {
115 SkStrokeRec::Style recStyle = fStrokeRec.getStyle(); 115 SkStrokeRec::Style recStyle = fStrokeRec.getStyle();
116 if (recStyle != SkStrokeRec::kFill_Style && recStyle != SkStrokeRec::kSt rokeAndFill_Style) { 116 if (recStyle != SkStrokeRec::kFill_Style && recStyle != SkStrokeRec::kSt rokeAndFill_Style) {
117 fDashInfo.fType = SkPathEffect::kDash_DashType; 117 fDashInfo.fType = SkPathEffect::kDash_DashType;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return false; 190 return false;
191 } else { 191 } else {
192 SkASSERT(SkStrokeRec::kFill_Style == strokeRec.getStyle() || 192 SkASSERT(SkStrokeRec::kFill_Style == strokeRec.getStyle() ||
193 SkStrokeRec::kHairline_Style == strokeRec.getStyle()); 193 SkStrokeRec::kHairline_Style == strokeRec.getStyle());
194 *style = strokeRec.getStyle() == SkStrokeRec::kFill_Style 194 *style = strokeRec.getStyle() == SkStrokeRec::kFill_Style
195 ? SkStrokeRec::kFill_InitStyle 195 ? SkStrokeRec::kFill_InitStyle
196 : SkStrokeRec::kHairline_InitStyle; 196 : SkStrokeRec::kHairline_InitStyle;
197 } 197 }
198 return true; 198 return true;
199 } 199 }
OLDNEW
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698