aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-08-02 08:05:56 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-02 08:05:56 -0700
commitc573a40ed5024b463e47088d307e3164a486dba5 (patch)
tree17969315cf64ce827395c4b8ad9273cc6f96886d /include/private
parent7d0e3bc785fc5aaf2ed0aa8f37a2bc85c2f82da0 (diff)
Add drawImageLattice() and drawBitmapLattice() APIs
The specified image/bitmap is divided into rects, which can be draw stretched, shrunk, or at a fixed size. Will be used by Android to draw 9patch (which are acutally N-patch) images. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1992283002 Review-Url: https://codereview.chromium.org/1992283002
Diffstat (limited to 'include/private')
-rw-r--r--include/private/SkRecords.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/private/SkRecords.h b/include/private/SkRecords.h
index 32da3dd377..a095452d1c 100644
--- a/include/private/SkRecords.h
+++ b/include/private/SkRecords.h
@@ -55,6 +55,7 @@ namespace SkRecords {
M(ClipRegion) \
M(DrawDrawable) \
M(DrawImage) \
+ M(DrawImageLattice) \
M(DrawImageRect) \
M(DrawImageNine) \
M(DrawDRRect) \
@@ -222,6 +223,14 @@ RECORD(DrawImage, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag,
sk_sp<const SkImage> image;
SkScalar left;
SkScalar top);
+RECORD(DrawImageLattice, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag,
+ Optional<SkPaint> paint;
+ sk_sp<const SkImage> image;
+ int xCount;
+ PODArray<int> xDivs;
+ int yCount;
+ PODArray<int> yDivs;
+ SkRect dst);
RECORD(DrawImageRect, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag,
Optional<SkPaint> paint;
sk_sp<const SkImage> image;