From ca8c0953e8da1def5e6c12dde6d4368b4bf16077 Mon Sep 17 00:00:00 2001 From: Stan Iliev Date: Mon, 11 Dec 2017 13:01:58 -0500 Subject: 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 Reviewed-by: Derek Sollenberger --- bench/DrawLatticeBench.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bench/DrawLatticeBench.cpp') diff --git a/bench/DrawLatticeBench.cpp b/bench/DrawLatticeBench.cpp index 7a8cdf3b3a..fbab2f7adb 100644 --- a/bench/DrawLatticeBench.cpp +++ b/bench/DrawLatticeBench.cpp @@ -22,8 +22,9 @@ public: fLattice.fXCount = xCount; fLattice.fYDivs = yDivs; fLattice.fYCount = yCount; - fLattice.fFlags = nullptr; + fLattice.fRectTypes = nullptr; fLattice.fBounds = nullptr; + fLattice.fColors = nullptr; fName = SkStringPrintf("DrawLattice_%s", desc); } -- cgit v1.2.3