Chromium Code Reviews| Index: include/gpu/GrDrawContext.h |
| diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h |
| index d55818b6d7420d40f8fa44a924d422abd86e2323..77c3c06fdb16a385824b42f9c2c3aa2e2ca98373 100644 |
| --- a/include/gpu/GrDrawContext.h |
| +++ b/include/gpu/GrDrawContext.h |
| @@ -26,6 +26,7 @@ class GrRenderTarget; |
| class GrStrokeInfo; |
| class GrSurface; |
| class GrTextContext; |
|
robertphillips
2015/11/18 18:12:06
Do we need this guy ?
joshualitt
2015/11/18 19:07:07
Acknowledged.
|
| +class SkBitmap; |
| class SkDrawFilter; |
| struct SkIPoint; |
| struct SkIRect; |
| @@ -242,6 +243,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 |