GrBlurUtils.h 1.4 KB

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