OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkGpuBlurUtils.h" | 8 #include "SkGpuBlurUtils.h" |
9 | 9 |
10 #include "SkRect.h" | 10 #include "SkRect.h" |
11 | 11 |
12 #if SK_SUPPORT_GPU | 12 #if SK_SUPPORT_GPU |
13 #include "effects/GrConvolutionEffect.h" | 13 #include "effects/GrConvolutionEffect.h" |
14 #include "effects/GrMatrixConvolutionEffect.h" | 14 #include "effects/GrMatrixConvolutionEffect.h" |
15 #include "GrContext.h" | 15 #include "GrContext.h" |
16 #include "GrCaps.h" | 16 #include "GrCaps.h" |
17 #include "GrDrawContext.h" | 17 #include "GrDrawContext.h" |
| 18 #include "GrFixedClip.h" |
18 | 19 |
19 #define MAX_BLUR_SIGMA 4.0f | 20 #define MAX_BLUR_SIGMA 4.0f |
20 | 21 |
21 static void scale_irect_roundout(SkIRect* rect, float xScale, float yScale) { | 22 static void scale_irect_roundout(SkIRect* rect, float xScale, float yScale) { |
22 rect->fLeft = SkScalarFloorToInt(SkScalarMul(rect->fLeft, xScale)); | 23 rect->fLeft = SkScalarFloorToInt(SkScalarMul(rect->fLeft, xScale)); |
23 rect->fTop = SkScalarFloorToInt(SkScalarMul(rect->fTop, yScale)); | 24 rect->fTop = SkScalarFloorToInt(SkScalarMul(rect->fTop, yScale)); |
24 rect->fRight = SkScalarCeilToInt(SkScalarMul(rect->fRight, xScale)); | 25 rect->fRight = SkScalarCeilToInt(SkScalarMul(rect->fRight, xScale)); |
25 rect->fBottom = SkScalarCeilToInt(SkScalarMul(rect->fBottom, yScale)); | 26 rect->fBottom = SkScalarCeilToInt(SkScalarMul(rect->fBottom, yScale)); |
26 } | 27 } |
27 | 28 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 dstDrawContext.swap(tmpDrawContext); | 373 dstDrawContext.swap(tmpDrawContext); |
373 } | 374 } |
374 | 375 |
375 return srcDrawContext; | 376 return srcDrawContext; |
376 } | 377 } |
377 | 378 |
378 } | 379 } |
379 | 380 |
380 #endif | 381 #endif |
381 | 382 |
OLD | NEW |