1 /* 2 * Copyright 2015 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef GrBlurUtils_DEFINED 9 #define GrBlurUtils_DEFINED 10 11 #include "include/private/GrTypesPriv.h" 12 13 class GrClip; 14 class GrPaint; 15 class GrRecordingContext; 16 class GrRenderTarget; 17 class GrSurfaceDrawContext; 18 class GrStyledShape; 19 class GrStyle; 20 struct SkIRect; 21 class SkMatrixProvider; 22 class SkMaskFilter; 23 class SkMatrix; 24 class SkPaint; 25 class SkPath; 26 class SkPathEffect; 27 28 29 /** 30 * Blur utilities. 31 */ 32 namespace GrBlurUtils { 33 /** 34 * Draw a shape handling the mask filter if present. 35 */ 36 void drawShapeWithMaskFilter(GrRecordingContext*, 37 GrSurfaceDrawContext*, 38 const GrClip*, 39 const SkPaint&, 40 const SkMatrixProvider&, 41 const GrStyledShape&); 42 43 /** 44 * Draw a shape handling the mask filter. The mask filter is not optional. 45 * The GrPaint will be modified after return. 46 */ 47 void drawShapeWithMaskFilter(GrRecordingContext*, 48 GrSurfaceDrawContext*, 49 const GrClip*, 50 const GrStyledShape&, 51 GrPaint&&, 52 const SkMatrix& viewMatrix, 53 const SkMaskFilter*); 54 } // namespace GrBlurUtils 55 56 #endif 57