OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 #include "GrGLPath.h" | 9 #include "GrGLPath.h" |
10 #include "GrGLPathRendering.h" | 10 #include "GrGLPathRendering.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 pathCoords.push_back_n(coordsForVerb, coords); | 159 pathCoords.push_back_n(coordsForVerb, coords); |
160 } | 160 } |
161 } | 161 } |
162 | 162 |
163 SkASSERT(verbCnt == pathCommands.count()); | 163 SkASSERT(verbCnt == pathCommands.count()); |
164 SkASSERT(numCoords == pathCoords.count()); | 164 SkASSERT(numCoords == pathCoords.count()); |
165 | 165 |
166 GR_GL_CALL(gpu->glInterface(), PathCommands(pathID, pathCommands.count()
, &pathCommands[0], | 166 GR_GL_CALL(gpu->glInterface(), PathCommands(pathID, pathCommands.count()
, &pathCommands[0], |
167 pathCoords.count(), GR_GL_FLOAT, &pathCoords[0])); | 167 pathCoords.count(), GR_GL_FLOAT, &pathCoords[0])); |
168 } else { | 168 } else { |
169 GR_GL_CALL(gpu->glInterface(), PathCommands(pathID, 0, NULL, 0, GR_GL_FL
OAT, NULL)); | 169 GR_GL_CALL(gpu->glInterface(), PathCommands(pathID, 0, nullptr, 0, GR_GL
_FLOAT, nullptr)); |
170 } | 170 } |
171 | 171 |
172 if (stroke.needToApply()) { | 172 if (stroke.needToApply()) { |
173 SkASSERT(!stroke.isHairlineStyle()); | 173 SkASSERT(!stroke.isHairlineStyle()); |
174 GR_GL_CALL(gpu->glInterface(), | 174 GR_GL_CALL(gpu->glInterface(), |
175 PathParameterf(pathID, GR_GL_PATH_STROKE_WIDTH, SkScalarToFloat(stro
ke.getWidth()))); | 175 PathParameterf(pathID, GR_GL_PATH_STROKE_WIDTH, SkScalarToFloat(stro
ke.getWidth()))); |
176 GR_GL_CALL(gpu->glInterface(), | 176 GR_GL_CALL(gpu->glInterface(), |
177 PathParameterf(pathID, GR_GL_PATH_MITER_LIMIT, SkScalarToFloat(strok
e.getMiter()))); | 177 PathParameterf(pathID, GR_GL_PATH_MITER_LIMIT, SkScalarToFloat(strok
e.getMiter()))); |
178 GrGLenum join = join_to_gl_join(stroke.getJoin()); | 178 GrGLenum join = join_to_gl_join(stroke.getJoin()); |
179 GR_GL_CALL(gpu->glInterface(), PathParameteri(pathID, GR_GL_PATH_JOIN_ST
YLE, join)); | 179 GR_GL_CALL(gpu->glInterface(), PathParameteri(pathID, GR_GL_PATH_JOIN_ST
YLE, join)); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 } | 220 } |
221 | 221 |
222 INHERITED::onRelease(); | 222 INHERITED::onRelease(); |
223 } | 223 } |
224 | 224 |
225 void GrGLPath::onAbandon() { | 225 void GrGLPath::onAbandon() { |
226 fPathID = 0; | 226 fPathID = 0; |
227 | 227 |
228 INHERITED::onAbandon(); | 228 INHERITED::onAbandon(); |
229 } | 229 } |
OLD | NEW |