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 "GrTypesPriv.h" 12 13 class GrClip; 14 class GrContext; 15 class GrPaint; 16 class GrRenderTarget; 17 class GrRenderTargetContext; 18 class GrShape; 19 class GrStyle; 20 struct SkIRect; 21 class SkMaskFilter; 22 class SkMatrix; 23 class SkPaint; 24 class SkPath; 25 class SkPathEffect; 26 27 28 /** 29 * Blur utilities. 30 */ 31 namespace GrBlurUtils { 32 /** 33 * Draw a shape handling the mask filter if present. 34 */ 35 void drawShapeWithMaskFilter(GrContext*, 36 GrRenderTargetContext*, 37 const GrClip&, 38 const SkPaint&, 39 const SkMatrix& viewMatrix, 40 const GrShape&); 41 42 /** 43 * Draw a shape handling the mask filter. The mask filter is not optional. 44 * The GrPaint will be modified after return. 45 */ 46 void drawShapeWithMaskFilter(GrContext*, 47 GrRenderTargetContext*, 48 const GrClip&, 49 const GrShape&, 50 GrPaint&&, 51 const SkMatrix& viewMatrix, 52 const SkMaskFilter*); 53 }; 54 55 #endif 56