aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrNinePatch.cpp
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 /src/gpu/batches/GrNinePatch.cpp
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 'src/gpu/batches/GrNinePatch.cpp')
-rw-r--r--src/gpu/batches/GrNinePatch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/batches/GrNinePatch.cpp b/src/gpu/batches/GrNinePatch.cpp
index 62af20b2cf..cde3d266ca 100644
--- a/src/gpu/batches/GrNinePatch.cpp
+++ b/src/gpu/batches/GrNinePatch.cpp
@@ -12,7 +12,7 @@
#include "GrResourceProvider.h"
#include "GrVertexBatch.h"
#include "SkBitmap.h"
-#include "SkNinePatchIter.h"
+#include "SkLatticeIter.h"
#include "SkRect.h"
static sk_sp<GrGeometryProcessor> create_gp(bool readsCoverage) {
@@ -101,7 +101,7 @@ private:
i * kRectsPerInstance * kVertsPerRect * vertexStride;
const Patch& patch = fPatches[i];
- SkNinePatchIter iter(fImageWidth, fImageHeight, patch.fCenter, patch.fDst);
+ SkLatticeIter iter(fImageWidth, fImageHeight, patch.fCenter, patch.fDst);
SkRect srcR, dstR;
while (iter.next(&srcR, &dstR)) {