diff options
author | jvanverth <jvanverth@google.com> | 2015-08-07 10:09:28 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-07 10:09:28 -0700 |
commit | 31ff762dc8bfcd86eb4af92b18fdad36913a04e5 (patch) | |
tree | c5ea4bb600204ff997ec32f69a8a459968700a3f /include/gpu | |
parent | 767276e4bd97ebea690884d156862d5e6e8aa7fd (diff) |
First pass at drawAtlas batching.
Moves drawAtlas setup into its own method in GrDrawContext, and adds
DrawAtlasBatch.
Uses pre-built index buffer for quads.
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/1277933003
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrDrawContext.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h index 4d59b8cd9d..7a2223f78f 100644 --- a/include/gpu/GrDrawContext.h +++ b/include/gpu/GrDrawContext.h @@ -33,6 +33,7 @@ class SkPath; struct SkPoint; struct SkRect; class SkRRect; +struct SkRSXform; class SkTextBlob; /* @@ -222,6 +223,26 @@ public: int indexCount); /** + * Draws textured sprites from an atlas with a paint. + * + * @param paint describes how to color pixels. + * @param viewMatrix transformation matrix + * @param spriteCount number of sprites. + * @param xform array of compressed transformation data, required. + * @param texRect array of texture rectangles used to access the paint. + * @param colors optional array of per-sprite colors, supercedes + * the paint's color field. + */ + void drawAtlas(GrRenderTarget*, + const GrClip&, + const GrPaint& paint, + const SkMatrix& viewMatrix, + int spriteCount, + const SkRSXform xform[], + const SkRect texRect[], + const SkColor colors[]); + + /** * Draws an oval. * * @param paint describes how to color pixels. |