OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrBlurUtils.h" | 8 #include "GrBlurUtils.h" |
9 #include "GrDrawContext.h" | 9 #include "GrDrawContext.h" |
10 #include "GrCaps.h" | 10 #include "GrCaps.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // should I push prePathMatrix on our MV stack temporarily, instead | 190 // should I push prePathMatrix on our MV stack temporarily, instead |
191 // of applying it here? See SkDraw.cpp | 191 // of applying it here? See SkDraw.cpp |
192 pathPtr->transform(*prePathMatrix, result); | 192 pathPtr->transform(*prePathMatrix, result); |
193 pathPtr = result; | 193 pathPtr = result; |
194 } | 194 } |
195 } | 195 } |
196 // at this point we're done with prePathMatrix | 196 // at this point we're done with prePathMatrix |
197 SkDEBUGCODE(prePathMatrix = (const SkMatrix*)0x50FF8001;) | 197 SkDEBUGCODE(prePathMatrix = (const SkMatrix*)0x50FF8001;) |
198 | 198 |
199 GrPaint grPaint; | 199 GrPaint grPaint; |
200 if (!SkPaint2GrPaint(context, renderTarget, paint, viewMatrix, true, &grPain
t)) { | 200 if (!SkPaint2GrPaint(context, paint, viewMatrix, true, &grPaint)) { |
201 return; | 201 return; |
202 } | 202 } |
203 | 203 |
204 const SkRect* cullRect = nullptr; // TODO: what is our bounds? | 204 const SkRect* cullRect = nullptr; // TODO: what is our bounds? |
205 if (!strokeInfo.isDashed() && pathEffect && pathEffect->filterPath(effectPat
h.init(), *pathPtr, | 205 if (!strokeInfo.isDashed() && pathEffect && pathEffect->filterPath(effectPat
h.init(), *pathPtr, |
206 &strokeIn
fo, cullRect)) { | 206 &strokeIn
fo, cullRect)) { |
207 pathPtr = effectPath.get(); | 207 pathPtr = effectPath.get(); |
208 pathIsMutable = true; | 208 pathIsMutable = true; |
209 } | 209 } |
210 | 210 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 SkPaint::kFill_Sty
le; | 292 SkPaint::kFill_Sty
le; |
293 draw_with_mask_filter(drawContext, context->textureProvider(), renderTar
get, | 293 draw_with_mask_filter(drawContext, context->textureProvider(), renderTar
get, |
294 clip, viewMatrix, *devPathPtr, | 294 clip, viewMatrix, *devPathPtr, |
295 paint.getMaskFilter(), clipBounds, &grPaint, style
); | 295 paint.getMaskFilter(), clipBounds, &grPaint, style
); |
296 return; | 296 return; |
297 } | 297 } |
298 | 298 |
299 drawContext->drawPath(renderTarget, clip, grPaint, viewMatrix, *pathPtr, str
okeInfo); | 299 drawContext->drawPath(renderTarget, clip, grPaint, viewMatrix, *pathPtr, str
okeInfo); |
300 } | 300 } |
301 | 301 |
OLD | NEW |