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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 225 } |
226 | 226 |
227 // First see if we can do the draw + mask filter direct to the dst. | 227 // First see if we can do the draw + mask filter direct to the dst. |
228 SkStrokeRec rec(SkStrokeRec::kFill_InitStyle); | 228 SkStrokeRec rec(SkStrokeRec::kFill_InitStyle); |
229 if (mf->directFilterRRectMaskGPU(fContext, | 229 if (mf->directFilterRRectMaskGPU(fContext, |
230 fDrawContext.get(), | 230 fDrawContext.get(), |
231 &grPaint, | 231 &grPaint, |
232 clip, | 232 clip, |
233 viewMatrix, | 233 viewMatrix, |
234 rec, | 234 rec, |
| 235 SkRRect::MakeRect(clippedSrcRect), |
235 SkRRect::MakeRect(clippedDstRect))) { | 236 SkRRect::MakeRect(clippedDstRect))) { |
236 return; | 237 return; |
237 } | 238 } |
238 SkPath rectPath; | 239 SkPath rectPath; |
239 rectPath.addRect(clippedDstRect); | 240 rectPath.addRect(clippedDstRect); |
240 rectPath.setIsVolatile(true); | 241 rectPath.setIsVolatile(true); |
241 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext.get(), fCl
ip, | 242 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext.get(), fCl
ip, |
242 rectPath, &grPaint, viewMatrix, mf, GrSt
yle::SimpleFill(), | 243 rectPath, &grPaint, viewMatrix, mf, GrSt
yle::SimpleFill(), |
243 true); | 244 true); |
244 } | 245 } |
OLD | NEW |