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 "SkGpuDevice.h" | 8 #include "SkGpuDevice.h" |
9 | 9 |
10 #include "GrBlurUtils.h" | 10 #include "GrBlurUtils.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 if (!mf) { | 221 if (!mf) { |
222 fDrawContext->drawRect(clip, grPaint, viewMatrix, clippedDstRect); | 222 fDrawContext->drawRect(clip, grPaint, viewMatrix, clippedDstRect); |
223 return; | 223 return; |
224 } | 224 } |
225 | 225 |
226 // First see if we can do the draw + mask filter direct to the dst. | 226 // First see if we can do the draw + mask filter direct to the dst. |
227 SkStrokeRec rec(SkStrokeRec::kFill_InitStyle); | 227 SkStrokeRec rec(SkStrokeRec::kFill_InitStyle); |
228 SkRRect rrect; | 228 SkRRect rrect; |
229 rrect.setRect(clippedDstRect); | 229 rrect.setRect(clippedDstRect); |
230 if (mf->directFilterRRectMaskGPU(fContext->textureProvider(), | 230 if (mf->directFilterRRectMaskGPU(fContext->textureProvider(), |
231 fDrawContext, | 231 fDrawContext.get(), |
232 &grPaint, | 232 &grPaint, |
233 clip, | 233 clip, |
234 viewMatrix, | 234 viewMatrix, |
235 rec, | 235 rec, |
236 rrect)) { | 236 rrect)) { |
237 return; | 237 return; |
238 } | 238 } |
239 SkPath rectPath; | 239 SkPath rectPath; |
240 rectPath.addRect(clippedDstRect); | 240 rectPath.addRect(clippedDstRect); |
241 rectPath.setIsVolatile(true); | 241 rectPath.setIsVolatile(true); |
242 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext, fClip, | 242 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext.get(), fCl
ip, |
243 rectPath, &grPaint, viewMatrix, mf, pain
t.getPathEffect(), | 243 rectPath, &grPaint, viewMatrix, mf, pain
t.getPathEffect(), |
244 GrStrokeInfo::FillInfo(), true); | 244 GrStrokeInfo::FillInfo(), true); |
245 } | 245 } |
OLD | NEW |