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