Home
last modified time | relevance | path

Searched refs:lattice (Results 1 – 11 of 11) sorted by relevance

/frameworks/base/libs/hwui/
DNinePatchUtils.h22 static inline void SetLatticeDivs(SkCanvas::Lattice* lattice, const Res_png_9patch& chunk, in SetLatticeDivs() argument
24 lattice->fXCount = chunk.numXDivs; in SetLatticeDivs()
25 lattice->fYCount = chunk.numYDivs; in SetLatticeDivs()
26 lattice->fXDivs = chunk.getXDivs(); in SetLatticeDivs()
27 lattice->fYDivs = chunk.getYDivs(); in SetLatticeDivs()
31 if (lattice->fXCount > 0 && width == lattice->fXDivs[lattice->fXCount - 1]) { in SetLatticeDivs()
32 lattice->fXCount--; in SetLatticeDivs()
34 if (lattice->fYCount > 0 && height == lattice->fYDivs[lattice->fYCount - 1]) { in SetLatticeDivs()
35 lattice->fYCount--; in SetLatticeDivs()
39 static inline int NumDistinctRects(const SkCanvas::Lattice& lattice) { in NumDistinctRects() argument
[all …]
DSkiaCanvas.cpp689 SkCanvas::Lattice lattice; in drawNinePatch() local
690 NinePatchUtils::SetLatticeDivs(&lattice, chunk, bitmap.width(), bitmap.height()); in drawNinePatch()
692 lattice.fRectTypes = nullptr; in drawNinePatch()
693 lattice.fColors = nullptr; in drawNinePatch()
695 if (chunk.numColors > 0 && chunk.numColors == NinePatchUtils::NumDistinctRects(lattice)) { in drawNinePatch()
698 numFlags = (lattice.fXCount + 1) * (lattice.fYCount + 1); in drawNinePatch()
704 NinePatchUtils::SetLatticeFlags(&lattice, flags.get(), numFlags, chunk, colors.get()); in drawNinePatch()
707 lattice.fBounds = nullptr; in drawNinePatch()
712 mCanvas->drawImageLattice(image.get(), lattice, dst, filter, &p); in drawNinePatch()
DRecordingCanvas.cpp717 void DisplayListData::drawImageLattice(sk_sp<const SkImage> image, const SkCanvas::Lattice& lattice, in drawImageLattice() argument
720 int xs = lattice.fXCount, ys = lattice.fYCount; in drawImageLattice()
721 int fs = lattice.fRectTypes ? (xs + 1) * (ys + 1) : 0; in drawImageLattice()
724 SkASSERT(lattice.fBounds); in drawImageLattice()
725 void* pod = this->push<DrawImageLattice>(bytes, std::move(image), xs, ys, fs, *lattice.fBounds, in drawImageLattice()
727 copy_v(pod, lattice.fXDivs, xs, lattice.fYDivs, ys, lattice.fColors, fs, lattice.fRectTypes, in drawImageLattice()
1032 void RecordingCanvas::drawImageLattice(const sk_sp<SkImage>& image, const Lattice& lattice, in drawImageLattice() argument
1040 Lattice latticePlusBounds = lattice; in drawImageLattice()
1066 void RecordingCanvas::onDrawImageLattice2(const SkImage* img, const SkCanvas::Lattice& lattice, in onDrawImageLattice2() argument
1069 fDL->drawImageLattice(sk_ref_sp(img), lattice, dst, filter, paint, BitmapPalette::Unknown); in onDrawImageLattice2()
DRecordingCanvas.h195 void drawImageLattice(const sk_sp<SkImage>& image, const Lattice& lattice, const SkRect& dst,
/frameworks/base/libs/hwui/jni/
DNinePatch.cpp95 SkCanvas::Lattice lattice; in getTransparentRegion() local
97 lattice.fBounds = &src; in getTransparentRegion()
98 NinePatchUtils::SetLatticeDivs(&lattice, *chunk, bitmap.width(), bitmap.height()); in getTransparentRegion()
99 lattice.fRectTypes = nullptr; in getTransparentRegion()
100 lattice.fColors = nullptr; in getTransparentRegion()
103 if (SkLatticeIter::Valid(bitmap.width(), bitmap.height(), lattice)) { in getTransparentRegion()
104 SkLatticeIter iter(lattice, dst); in getTransparentRegion()
/frameworks/base/libs/hwui/pipeline/skia/
DSkiaRecordingCanvas.cpp266 SkCanvas::Lattice lattice; in drawNinePatch() local
267 NinePatchUtils::SetLatticeDivs(&lattice, chunk, bitmap.width(), bitmap.height()); in drawNinePatch()
269 lattice.fRectTypes = nullptr; in drawNinePatch()
270 lattice.fColors = nullptr; in drawNinePatch()
272 if (chunk.numColors > 0 && chunk.numColors == NinePatchUtils::NumDistinctRects(lattice)) { in drawNinePatch()
275 numFlags = (lattice.fXCount + 1) * (lattice.fYCount + 1); in drawNinePatch()
281 NinePatchUtils::SetLatticeFlags(&lattice, flags.get(), numFlags, chunk, colors.get()); in drawNinePatch()
284 lattice.fBounds = nullptr; in drawNinePatch()
294 mRecorder.drawImageLattice(image, lattice, dst, filter, &p, bitmap.palette()); in drawNinePatch()
DDumpOpsCanvas.h99 void onDrawImageLattice2(const SkImage*, const Lattice& lattice, const SkRect& dst, in onDrawImageLattice2() argument
/frameworks/base/libs/hwui/canvas/
DCanvasOps.h393 SkCanvas::Lattice lattice,
397 lattice(lattice),
404 SkCanvas::Lattice lattice;
411 canvas->drawImageLattice(image.get(), lattice, dst, filter, &paint);
/frameworks/base/libs/hwui/tests/unit/
DFatalTestCanvas.h78 void onDrawImageLattice2(const SkImage*, const Lattice& lattice, const SkRect& dst, in onDrawImageLattice2() argument
DCanvasOpTests.cpp525 SkCanvas::Lattice lattice = { xDivs, yDivs, fillTypes[0], 2, in TEST() local
532 lattice, in TEST()
/frameworks/base/libs/hwui/tests/common/
DCallCountingCanvas.h123 void onDrawImageLattice2(const SkImage* image, const SkCanvas::Lattice& lattice, in onDrawImageLattice2() argument