aboutsummaryrefslogtreecommitdiffhomepage
path: root/fuzz
diff options
context:
space:
mode:
authorGravatar Stan Iliev <stani@google.com>2017-12-11 13:01:58 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-11 18:26:18 +0000
commitca8c0953e8da1def5e6c12dde6d4368b4bf16077 (patch)
treec7c0dabde70dbebfedba579f6f9d803652201943 /fuzz
parent51493ee8488e29499a1a0a678a50aeca44ebf718 (diff)
Implement a fast path for solid color lattice rectangle
Add a flag that hints, which lattice rectangles are solid colors. Draw solid rectangles and 1x1 rectangles with drawRect. Test: Measured performance of a ninepatch drawn by HWUI Bug: b/69796044 Change-Id: Ib3b00ca608da42fa9f2d2038cc126a978421ec7c Reviewed-on: https://skia-review.googlesource.com/79821 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/FuzzCanvas.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp
index 618f7ac934..74b246757d 100644
--- a/fuzz/FuzzCanvas.cpp
+++ b/fuzz/FuzzCanvas.cpp
@@ -1548,7 +1548,7 @@ static void fuzz_canvas(Fuzz* fuzz, SkCanvas* canvas, int depth = 9) {
}
constexpr int kMax = 6;
int xDivs[kMax], yDivs[kMax];
- SkCanvas::Lattice lattice{xDivs, yDivs, nullptr, 0, 0, nullptr};
+ SkCanvas::Lattice lattice{xDivs, yDivs, nullptr, 0, 0, nullptr, nullptr};
fuzz->nextRange(&lattice.fXCount, 2, kMax);
fuzz->nextRange(&lattice.fYCount, 2, kMax);
fuzz->nextN(xDivs, lattice.fXCount);
@@ -1566,7 +1566,7 @@ static void fuzz_canvas(Fuzz* fuzz, SkCanvas* canvas, int depth = 9) {
}
constexpr int kMax = 6;
int xDivs[kMax], yDivs[kMax];
- SkCanvas::Lattice lattice{xDivs, yDivs, nullptr, 0, 0, nullptr};
+ SkCanvas::Lattice lattice{xDivs, yDivs, nullptr, 0, 0, nullptr, nullptr};
fuzz->nextRange(&lattice.fXCount, 2, kMax);
fuzz->nextRange(&lattice.fYCount, 2, kMax);
fuzz->nextN(xDivs, lattice.fXCount);