diff options
author | robertphillips <robertphillips@google.com> | 2015-05-27 11:02:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-27 11:02:55 -0700 |
commit | ccb1b5751075506b4615d2112889d01ee8ad6436 (patch) | |
tree | 84bac0d48ad26f2f3bdb8c4b2ddeb95bb3459750 /src/gpu/GrBlurUtils.h | |
parent | 24a366a03756d7a8755f940d3160698cf9122cc0 (diff) |
Move SkGpuDevice::internalDrawPath to GrBlurUtils::drawPathWithMaskFilter
This CL is ugly but it:
removes the stored SkGpuDevice back pointer from GrTextContext (at the cost of passing more parameters)
moves SkGpuDevice::internalDrawPath to GrDrawContext::drawPathFull
Unfortunately, the GrTextContext-derived classes still need the SkGpuDevice for filterTextFlags calls but I will try removing that in a separate CL.
Review URL: https://codereview.chromium.org/1157773003
Diffstat (limited to 'src/gpu/GrBlurUtils.h')
-rw-r--r-- | src/gpu/GrBlurUtils.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/gpu/GrBlurUtils.h b/src/gpu/GrBlurUtils.h new file mode 100644 index 0000000000..0fc77266b0 --- /dev/null +++ b/src/gpu/GrBlurUtils.h @@ -0,0 +1,40 @@ +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrBlurUtils_DEFINED +#define GrBlurUtils_DEFINED + +class GrClip; +class GrContext; +class GrDrawContext; +class GrRenderTarget; +struct SkIRect; +class SkMatrix; +class SkPaint; +class SkPath; + + +/** + * Blur utilities. + */ +namespace GrBlurUtils { + /** + * Draw a path handling the mask filter if present. + */ + void drawPathWithMaskFilter(GrContext* context, + GrDrawContext* drawContext, + GrRenderTarget* rt, + const GrClip& clip, + const SkPath& origSrcPath, + const SkPaint& paint, + const SkMatrix& origViewMatrix, + const SkMatrix* prePathMatrix, + const SkIRect& clipBounds, + bool pathIsMutable); +}; + +#endif |