| Index: include/gpu/GrDrawContext.h
|
| diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
|
| index 458ee4f539715abbfe0a07725756193a28d7c262..7bb9aafc78127252680ee0c88ead0ac79617ae5a 100644
|
| --- a/include/gpu/GrDrawContext.h
|
| +++ b/include/gpu/GrDrawContext.h
|
| @@ -28,7 +28,7 @@
|
| class GrPathProcessor;
|
| class GrPipelineBuilder;
|
| class GrRenderTarget;
|
| -class GrStyle;
|
| +class GrStrokeInfo;
|
| class GrSurface;
|
| class SkDrawFilter;
|
| struct SkIPoint;
|
| @@ -53,7 +53,7 @@
|
|
|
| // TODO: it is odd that we need both the SkPaint in the following 3 methods.
|
| // We should extract the text parameters from SkPaint and pass them separately
|
| - // akin to GrStyle (GrTextInfo?)
|
| + // akin to GrStrokeInfo (GrTextInfo?)
|
| virtual void drawText(const GrClip&, const GrPaint&, const SkPaint&,
|
| const SkMatrix& viewMatrix, const char text[], size_t byteLength,
|
| SkScalar x, SkScalar y, const SkIRect& clipBounds);
|
| @@ -90,15 +90,19 @@
|
| * Draw the rect using a paint.
|
| * @param paint describes how to color pixels.
|
| * @param viewMatrix transformation matrix
|
| - * @param style The style to apply. Null means fill. Currently path effects are not
|
| - * allowed.
|
| + * @param strokeInfo the stroke information (width, join, cap), and.
|
| + * the dash information (intervals, count, phase).
|
| + * If strokeInfo == NULL, then the rect is filled.
|
| + * Otherwise, if stroke width == 0, then the stroke
|
| + * is always a single pixel thick, else the rect is
|
| + * mitered/beveled stroked based on stroke width.
|
| * The rects coords are used to access the paint (through texture matrix)
|
| */
|
| void drawRect(const GrClip&,
|
| const GrPaint& paint,
|
| const SkMatrix& viewMatrix,
|
| const SkRect&,
|
| - const GrStyle* style = nullptr);
|
| + const GrStrokeInfo* strokeInfo = nullptr);
|
|
|
| /**
|
| * Maps a rectangle of shader coordinates to a rectangle and fills that rectangle.
|
| @@ -129,13 +133,14 @@
|
| * @param paint describes how to color pixels.
|
| * @param viewMatrix transformation matrix
|
| * @param rrect the roundrect to draw
|
| - * @param style style to apply to the rrect. Currently path effects are not allowed.
|
| + * @param strokeInfo the stroke information (width, join, cap) and
|
| + * the dash information (intervals, count, phase).
|
| */
|
| void drawRRect(const GrClip&,
|
| const GrPaint&,
|
| const SkMatrix& viewMatrix,
|
| const SkRRect& rrect,
|
| - const GrStyle& style);
|
| + const GrStrokeInfo&);
|
|
|
| /**
|
| * Shortcut for drawing an SkPath consisting of nested rrects using a paint.
|
| @@ -159,13 +164,14 @@
|
| * @param paint describes how to color pixels.
|
| * @param viewMatrix transformation matrix
|
| * @param path the path to draw
|
| - * @param style style to apply to the path.
|
| + * @param strokeInfo the stroke information (width, join, cap) and
|
| + * the dash information (intervals, count, phase).
|
| */
|
| void drawPath(const GrClip&,
|
| const GrPaint&,
|
| const SkMatrix& viewMatrix,
|
| const SkPath&,
|
| - const GrStyle& style);
|
| + const GrStrokeInfo&);
|
|
|
| /**
|
| * Draws vertices with a paint.
|
| @@ -220,13 +226,14 @@
|
| * @param paint describes how to color pixels.
|
| * @param viewMatrix transformation matrix
|
| * @param oval the bounding rect of the oval.
|
| - * @param style style to apply to the oval. Currently path effects are not allowed.
|
| + * @param strokeInfo the stroke information (width, join, cap) and
|
| + * the dash information (intervals, count, phase).
|
| */
|
| void drawOval(const GrClip&,
|
| const GrPaint& paint,
|
| const SkMatrix& viewMatrix,
|
| const SkRect& oval,
|
| - const GrStyle& style);
|
| + const GrStrokeInfo& strokeInfo);
|
|
|
| /**
|
| * Draw the image stretched differentially to fit into dst.
|
| @@ -311,7 +318,7 @@
|
| const GrPaint& paint,
|
| const SkMatrix& viewMatrix,
|
| const SkPath& path,
|
| - const GrStyle& style);
|
| + const GrStrokeInfo& strokeInfo);
|
|
|
| // This entry point allows the GrTextContext-derived classes to add their batches to
|
| // the drawTarget.
|
|
|