Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Unified Diff: src/gpu/GrSWMaskHelper.h

Issue 2081383006: Use GrShape in GrPathRenderer. (Closed) Base URL: https://chromium.googlesource.com/skia.git@shapemembers
Patch Set: Address comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPathRendererChain.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSWMaskHelper.h
diff --git a/src/gpu/GrSWMaskHelper.h b/src/gpu/GrSWMaskHelper.h
index 107c77ef595b3fff585987d127733993b818e644..b015b15a4b859f1ab13e00ebea4f01577236193a 100644
--- a/src/gpu/GrSWMaskHelper.h
+++ b/src/gpu/GrSWMaskHelper.h
@@ -19,11 +19,10 @@
class GrClip;
class GrPaint;
+class GrShape;
class GrTextureProvider;
class GrStyle;
class GrTexture;
-class SkPath;
-class SkStrokeRec;
struct GrUserStencilSettings;
/**
@@ -54,8 +53,7 @@ public:
void drawRect(const SkRect& rect, SkRegion::Op op, bool antiAlias, uint8_t alpha);
// Draw a single path into the accumuation bitmap using the specified op
- void drawPath(const SkPath& path, const GrStyle& style, SkRegion::Op op,
- bool antiAlias, uint8_t alpha);
+ void drawShape(const GrShape&, SkRegion::Op op, bool antiAlias, uint8_t alpha);
// Move the mask generation results from the internal bitmap to the gpu.
void toTexture(GrTexture* texture);
@@ -70,14 +68,13 @@ public:
// Canonical usage utility that draws a single path and uploads it
// to the GPU. The result is returned.
- static GrTexture* DrawPathMaskToTexture(GrTextureProvider*,
- const SkPath& path,
- const GrStyle& style,
- const SkIRect& resultBounds,
- bool antiAlias,
- const SkMatrix* matrix);
-
- // This utility routine is used to add a path's mask to some other draw.
+ static GrTexture* DrawShapeMaskToTexture(GrTextureProvider*,
+ const GrShape&,
+ const SkIRect& resultBounds,
+ bool antiAlias,
+ const SkMatrix* matrix);
+
+ // This utility routine is used to add a shape's mask to some other draw.
// The ClipMaskManager uses it to accumulate clip masks while the
// GrSoftwarePathRenderer uses it to fulfill a drawPath call.
// It draws with "texture" as a path mask into "target" using "rect" as
@@ -87,14 +84,14 @@ public:
// the draw state can be used to hold the mask texture stage.
// This method is really only intended to be used with the
// output of DrawPathMaskToTexture.
- static void DrawToTargetWithPathMask(GrTexture* texture,
- GrDrawContext*,
- const GrPaint* paint,
- const GrUserStencilSettings* userStencilSettings,
- const GrClip&,
- GrColor,
- const SkMatrix& viewMatrix,
- const SkIRect& rect);
+ static void DrawToTargetWithShapeMask(GrTexture* texture,
+ GrDrawContext*,
+ const GrPaint* paint,
+ const GrUserStencilSettings* userStencilSettings,
+ const GrClip&,
+ GrColor,
+ const SkMatrix& viewMatrix,
+ const SkIRect& rect);
private:
// Helper function to get a scratch texture suitable for capturing the
« no previous file with comments | « src/gpu/GrPathRendererChain.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698