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

Side by Side Diff: src/effects/SkCornerPathEffect.cpp

Issue 16195004: add asserts to point<-->verb helpers (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkRegion_path.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 "SkCornerPathEffect.h" 10 #include "SkCornerPathEffect.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 firstStep.set(0, 0); 104 firstStep.set(0, 0);
105 break; 105 break;
106 case SkPath::kClose_Verb: 106 case SkPath::kClose_Verb:
107 if (firstStep.fX || firstStep.fY) { 107 if (firstStep.fX || firstStep.fY) {
108 dst->quadTo(lastCorner.fX, lastCorner.fY, 108 dst->quadTo(lastCorner.fX, lastCorner.fY,
109 lastCorner.fX + firstStep.fX, 109 lastCorner.fX + firstStep.fX,
110 lastCorner.fY + firstStep.fY); 110 lastCorner.fY + firstStep.fY);
111 } 111 }
112 dst->close(); 112 dst->close();
113 break; 113 break;
114 case SkPath::kConic_Verb:
115 SkASSERT(0);
116 break;
114 case SkPath::kDone_Verb: 117 case SkPath::kDone_Verb:
115 goto DONE; 118 goto DONE;
116 } 119 }
117 120
118 if (SkPath::kMove_Verb == prevVerb) { 121 if (SkPath::kMove_Verb == prevVerb) {
119 firstStep = step; 122 firstStep = step;
120 } 123 }
121 prevVerb = verb; 124 prevVerb = verb;
122 } 125 }
123 DONE: 126 DONE:
124 return true; 127 return true;
125 } 128 }
126 129
127 void SkCornerPathEffect::flatten(SkFlattenableWriteBuffer& buffer) const { 130 void SkCornerPathEffect::flatten(SkFlattenableWriteBuffer& buffer) const {
128 this->INHERITED::flatten(buffer); 131 this->INHERITED::flatten(buffer);
129 buffer.writeScalar(fRadius); 132 buffer.writeScalar(fRadius);
130 } 133 }
131 134
132 SkCornerPathEffect::SkCornerPathEffect(SkFlattenableReadBuffer& buffer) { 135 SkCornerPathEffect::SkCornerPathEffect(SkFlattenableReadBuffer& buffer) {
133 fRadius = buffer.readScalar(); 136 fRadius = buffer.readScalar();
134 } 137 }
OLDNEW
« no previous file with comments | « src/core/SkRegion_path.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698