| Index: include/gpu/GrDrawContext.h
|
| diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
|
| index d55818b6d7420d40f8fa44a924d422abd86e2323..f051ebd994789faa7326cd4809fcf722aee6fcde 100644
|
| --- a/include/gpu/GrDrawContext.h
|
| +++ b/include/gpu/GrDrawContext.h
|
| @@ -242,6 +242,27 @@ public:
|
| const SkRect& oval,
|
| const GrStrokeInfo& strokeInfo);
|
|
|
| + /**
|
| + * Draw the image stretched differentially to fit into dst.
|
| + * center is a rect within the image, and logically divides the image
|
| + * into 9 sections (3x3). For example, if the middle pixel of a [5x5]
|
| + * image is the "center", then the center-rect should be [2, 2, 3, 3].
|
| + *
|
| + * If the dst is >= the image size, then...
|
| + * - The 4 corners are not stretched at all.
|
| + * - The sides are stretched in only one axis.
|
| + * - The center is stretched in both axes.
|
| + * Else, for each axis where dst < image,
|
| + * - The corners shrink proportionally
|
| + * - The sides (along the shrink axis) and center are not drawn
|
| + */
|
| + void drawImageNine(const GrClip&,
|
| + const GrPaint& paint,
|
| + const SkMatrix& viewMatrix,
|
| + int imageWidth,
|
| + int imageHeight,
|
| + const SkIRect& center,
|
| + const SkRect& dst);
|
|
|
| /**
|
| * Draws a batch
|
|
|