Home
last modified time | relevance | path

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

123

/third_party/flutter/skia/src/core/
DSkCanvasPriv.cpp39 bool SkCanvasPriv::ReadLattice(SkReadBuffer& buffer, SkCanvas::Lattice* lattice) { in ReadLattice() argument
40 lattice->fXCount = buffer.readInt(); in ReadLattice()
41 lattice->fXDivs = buffer.skipT<int32_t>(lattice->fXCount); in ReadLattice()
42 lattice->fYCount = buffer.readInt(); in ReadLattice()
43 lattice->fYDivs = buffer.skipT<int32_t>(lattice->fYCount); in ReadLattice()
45 lattice->fRectTypes = nullptr; in ReadLattice()
46 lattice->fColors = nullptr; in ReadLattice()
48 lattice->fRectTypes = buffer.skipT<SkCanvas::Lattice::RectType>(flagCount); in ReadLattice()
49 lattice->fColors = buffer.skipT<SkColor>(flagCount); in ReadLattice()
51 lattice->fBounds = buffer.skipT<SkIRect>(); in ReadLattice()
[all …]
DSkLatticeIter.cpp26 bool SkLatticeIter::Valid(int width, int height, const SkCanvas::Lattice& lattice) { in Valid() argument
28 SkASSERT(lattice.fBounds); in Valid()
29 const SkIRect latticeBounds = *lattice.fBounds; in Valid()
34 bool zeroXDivs = lattice.fXCount <= 0 || (1 == lattice.fXCount && in Valid()
35 latticeBounds.fLeft == lattice.fXDivs[0]); in Valid()
36 bool zeroYDivs = lattice.fYCount <= 0 || (1 == lattice.fYCount && in Valid()
37 latticeBounds.fTop == lattice.fYDivs[0]); in Valid()
42 return valid_divs(lattice.fXDivs, lattice.fXCount, latticeBounds.fLeft, latticeBounds.fRight) in Valid()
43 && valid_divs(lattice.fYDivs, lattice.fYCount, latticeBounds.fTop, latticeBounds.fBottom); in Valid()
114 SkLatticeIter::SkLatticeIter(const SkCanvas::Lattice& lattice, const SkRect& dst) { in SkLatticeIter() argument
[all …]
DSkRecorder.cpp228 void SkRecorder::onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice, in onDrawBitmapLattice() argument
231 this->onDrawImageLattice(image.get(), lattice, dst, paint); in onDrawBitmapLattice()
249 void SkRecorder::onDrawImageLattice(const SkImage* image, const Lattice& lattice, const SkRect& dst, in onDrawImageLattice() argument
251 int flagCount = lattice.fRectTypes ? (lattice.fXCount + 1) * (lattice.fYCount + 1) : 0; in onDrawImageLattice()
252 SkASSERT(lattice.fBounds); in onDrawImageLattice()
254 lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount), in onDrawImageLattice()
255 lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount), in onDrawImageLattice()
256 flagCount, this->copy(lattice.fRectTypes, flagCount), in onDrawImageLattice()
257 this->copy(lattice.fColors, flagCount), *lattice.fBounds, dst); in onDrawImageLattice()
DSkRecordDraw.cpp109 SkCanvas::Lattice lattice; in draw() local
110 lattice.fXCount = r.xCount; in draw()
111 lattice.fXDivs = r.xDivs; in draw()
112 lattice.fYCount = r.yCount; in draw()
113 lattice.fYDivs = r.yDivs; in draw()
114 lattice.fRectTypes = (0 == r.flagCount) ? nullptr : r.flags; in draw()
115 lattice.fColors = (0 == r.flagCount) ? nullptr : r.colors; in draw()
116 lattice.fBounds = &r.src; in draw()
117 fCanvas->drawImageLattice(r.image.get(), lattice, r.dst, r.paint); in draw()
DSkLatticeIter.h24 static bool Valid(int imageWidth, int imageHeight, const SkCanvas::Lattice& lattice);
26 SkLatticeIter(const SkCanvas::Lattice& lattice, const SkRect& dst);
DSkOverdrawCanvas.cpp173 void SkOverdrawCanvas::onDrawImageLattice(const SkImage* image, const Lattice& lattice, in onDrawImageLattice() argument
176 Lattice latticePlusBounds = lattice; in onDrawImageLattice()
209 void SkOverdrawCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice, in onDrawBitmapLattice() argument
212 this->onDrawImageLattice(image.get(), lattice, dst, paint); in onDrawBitmapLattice()
DSkDevice.cpp166 const SkCanvas::Lattice& lattice, const SkRect& dst, in drawImageLattice() argument
168 SkLatticeIter iter(lattice, dst); in drawImageLattice()
193 const SkCanvas::Lattice& lattice, const SkRect& dst, in drawBitmapLattice() argument
195 SkLatticeIter iter(lattice, dst); in drawBitmapLattice()
/third_party/skia/src/core/
DSkCanvasPriv.cpp42 bool SkCanvasPriv::ReadLattice(SkReadBuffer& buffer, SkCanvas::Lattice* lattice) { in ReadLattice() argument
43 lattice->fXCount = buffer.readInt(); in ReadLattice()
44 lattice->fXDivs = buffer.skipT<int32_t>(lattice->fXCount); in ReadLattice()
45 lattice->fYCount = buffer.readInt(); in ReadLattice()
46 lattice->fYDivs = buffer.skipT<int32_t>(lattice->fYCount); in ReadLattice()
48 lattice->fRectTypes = nullptr; in ReadLattice()
49 lattice->fColors = nullptr; in ReadLattice()
51 lattice->fRectTypes = buffer.skipT<SkCanvas::Lattice::RectType>(flagCount); in ReadLattice()
52 lattice->fColors = buffer.skipT<SkColor>(flagCount); in ReadLattice()
54 lattice->fBounds = buffer.skipT<SkIRect>(); in ReadLattice()
[all …]
DSkLatticeIter.cpp26 bool SkLatticeIter::Valid(int width, int height, const SkCanvas::Lattice& lattice) { in Valid() argument
28 SkASSERT(lattice.fBounds); in Valid()
29 const SkIRect latticeBounds = *lattice.fBounds; in Valid()
34 bool zeroXDivs = lattice.fXCount <= 0 || (1 == lattice.fXCount && in Valid()
35 latticeBounds.fLeft == lattice.fXDivs[0]); in Valid()
36 bool zeroYDivs = lattice.fYCount <= 0 || (1 == lattice.fYCount && in Valid()
37 latticeBounds.fTop == lattice.fYDivs[0]); in Valid()
42 return valid_divs(lattice.fXDivs, lattice.fXCount, latticeBounds.fLeft, latticeBounds.fRight) in Valid()
43 && valid_divs(lattice.fYDivs, lattice.fYCount, latticeBounds.fTop, latticeBounds.fBottom); in Valid()
114 SkLatticeIter::SkLatticeIter(const SkCanvas::Lattice& lattice, const SkRect& dst) { in SkLatticeIter() argument
[all …]
DSkRecorder.cpp220 void SkRecorder::onDrawImageLattice2(const SkImage* image, const Lattice& lattice, const SkRect& ds… in onDrawImageLattice2() argument
222 int flagCount = lattice.fRectTypes ? (lattice.fXCount + 1) * (lattice.fYCount + 1) : 0; in onDrawImageLattice2()
223 SkASSERT(lattice.fBounds); in onDrawImageLattice2()
225 lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount), in onDrawImageLattice2()
226 lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount), in onDrawImageLattice2()
227 flagCount, this->copy(lattice.fRectTypes, flagCount), in onDrawImageLattice2()
228 this->copy(lattice.fColors, flagCount), *lattice.fBounds, dst, filter); in onDrawImageLattice2()
DSkRecordDraw.cpp120 SkCanvas::Lattice lattice; in draw() local
121 lattice.fXCount = r.xCount; in draw()
122 lattice.fXDivs = r.xDivs; in draw()
123 lattice.fYCount = r.yCount; in draw()
124 lattice.fYDivs = r.yDivs; in draw()
125 lattice.fRectTypes = (0 == r.flagCount) ? nullptr : r.flags; in draw()
126 lattice.fColors = (0 == r.flagCount) ? nullptr : r.colors; in draw()
127 lattice.fBounds = &r.src; in draw()
128 fCanvas->drawImageLattice(r.image.get(), lattice, r.dst, r.filter, r.paint); in draw()
DSkLatticeIter.h24 static bool Valid(int imageWidth, int imageHeight, const SkCanvas::Lattice& lattice);
26 SkLatticeIter(const SkCanvas::Lattice& lattice, const SkRect& dst);
DSkPicturePlayback.cpp417 SkCanvas::Lattice lattice; in handleOp() local
418 (void)SkCanvasPriv::ReadLattice(*reader, &lattice); in handleOp()
422 canvas->drawImageLattice(image, lattice, *dst, SkFilterMode::kNearest, paint); in handleOp()
427 SkCanvas::Lattice lattice; in handleOp() local
428 (void)SkCanvasPriv::ReadLattice(*reader, &lattice); in handleOp()
433 canvas->drawImageLattice(image, lattice, *dst, filter, paint); in handleOp()
/third_party/flutter/skia/gm/
Dlattice.cpp131 SkCanvas::Lattice lattice; in onDrawHelper() local
132 lattice.fXCount = 4; in onDrawHelper()
133 lattice.fXDivs = xDivs + 1; in onDrawHelper()
134 lattice.fYCount = 4; in onDrawHelper()
135 lattice.fYDivs = yDivs + 1; in onDrawHelper()
136 lattice.fRectTypes = nullptr; in onDrawHelper()
137 lattice.fColors = nullptr; in onDrawHelper()
141 lattice.fBounds = (bounds == SkIRect::MakeWH(image->width(), image->height())) ? in onDrawHelper()
149 canvas->drawBitmapLattice(bitmap, lattice, r); in onDrawHelper()
168 lattice.fXCount = 5; in onDrawHelper()
[all …]
/third_party/skia/gm/
Dlattice.cpp133 SkCanvas::Lattice lattice; in onDrawHelper() local
134 lattice.fXCount = 4; in onDrawHelper()
135 lattice.fXDivs = xDivs + 1; in onDrawHelper()
136 lattice.fYCount = 4; in onDrawHelper()
137 lattice.fYDivs = yDivs + 1; in onDrawHelper()
138 lattice.fRectTypes = nullptr; in onDrawHelper()
139 lattice.fColors = nullptr; in onDrawHelper()
143 lattice.fBounds = (bounds == SkIRect::MakeWH(image->width(), image->height())) ? in onDrawHelper()
151 canvas->drawImageLattice(image.get(), lattice, r); in onDrawHelper()
170 lattice.fXCount = 5; in onDrawHelper()
[all …]
/third_party/flutter/skia/src/gpu/ops/
DGrLatticeOp.cpp394 SkCanvas::Lattice lattice; in GR_DRAW_OP_TEST_DEFINE() local
427 lattice.fBounds = &subset; in GR_DRAW_OP_TEST_DEFINE()
428 lattice.fXCount = random->nextRangeU(1, subset.width()); in GR_DRAW_OP_TEST_DEFINE()
429 lattice.fYCount = random->nextRangeU(1, subset.height()); in GR_DRAW_OP_TEST_DEFINE()
430 xdivs.reset(new int[lattice.fXCount]); in GR_DRAW_OP_TEST_DEFINE()
431 ydivs.reset(new int[lattice.fYCount]); in GR_DRAW_OP_TEST_DEFINE()
432 init_random_divs(xdivs.get(), lattice.fXCount, subset.fLeft, subset.fRight, random); in GR_DRAW_OP_TEST_DEFINE()
433 init_random_divs(ydivs.get(), lattice.fYCount, subset.fTop, subset.fBottom, random); in GR_DRAW_OP_TEST_DEFINE()
434 lattice.fXDivs = xdivs.get(); in GR_DRAW_OP_TEST_DEFINE()
435 lattice.fYDivs = ydivs.get(); in GR_DRAW_OP_TEST_DEFINE()
[all …]
/third_party/skia/docs/examples/
Dskpaint_line_2d_path_effect.cpp7 SkMatrix lattice; in draw() local
8 lattice.setScale(8.0f, 8.0f); in draw()
9 lattice.preRotate(30.0f); in draw()
10 paint.setPathEffect(SkLine2DPathEffect::Make(0.0f, lattice)); in draw()
/third_party/skia/src/gpu/ops/
DLatticeOp.cpp454 SkCanvas::Lattice lattice; in GR_DRAW_OP_TEST_DEFINE() local
492 lattice.fBounds = &subset; in GR_DRAW_OP_TEST_DEFINE()
493 lattice.fXCount = random->nextRangeU(1, subset.width()); in GR_DRAW_OP_TEST_DEFINE()
494 lattice.fYCount = random->nextRangeU(1, subset.height()); in GR_DRAW_OP_TEST_DEFINE()
495 xdivs.reset(new int[lattice.fXCount]); in GR_DRAW_OP_TEST_DEFINE()
496 ydivs.reset(new int[lattice.fYCount]); in GR_DRAW_OP_TEST_DEFINE()
497 init_random_divs(xdivs.get(), lattice.fXCount, subset.fLeft, subset.fRight, random); in GR_DRAW_OP_TEST_DEFINE()
498 init_random_divs(ydivs.get(), lattice.fYCount, subset.fTop, subset.fBottom, random); in GR_DRAW_OP_TEST_DEFINE()
499 lattice.fXDivs = xdivs.get(); in GR_DRAW_OP_TEST_DEFINE()
500 lattice.fYDivs = ydivs.get(); in GR_DRAW_OP_TEST_DEFINE()
[all …]
/third_party/flutter/skia/samplecode/
DSampleTextEffects.cpp100 SkMatrix lattice; in makepe() local
102 lattice.setScale(rad*2, rad*2, 0, 0); in makepe()
103 lattice.postSkew(SK_Scalar1/3, 0, 0, 0); in makepe()
104 return sk_make_sp<Dot2DPathEffect>(rad, lattice, pts); in makepe()
/third_party/flutter/skia/docs/examples/
DCanvas_drawBitmapLattice.cpp30 SkCanvas::Lattice lattice = { xDivs, yDivs, fillTypes[0], SK_ARRAY_COUNT(xDivs), in draw() local
33 canvas->drawBitmapLattice(bitmap, lattice, SkRect::MakeWH(dest, 110 - dest), nullptr); in draw()
/third_party/flutter/skia/src/utils/
DSkPaintFilterCanvas.cpp142 void SkPaintFilterCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice, in onDrawBitmapLattice() argument
146 this->SkNWayCanvas::onDrawBitmapLattice(bitmap, lattice, dst, &apf.paint()); in onDrawBitmapLattice()
175 void SkPaintFilterCanvas::onDrawImageLattice(const SkImage* image, const Lattice& lattice, in onDrawImageLattice() argument
179 this->SkNWayCanvas::onDrawImageLattice(image, lattice, dst, &apf.paint()); in onDrawImageLattice()
DSkNWayCanvas.cpp239 void SkNWayCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice, in onDrawBitmapLattice() argument
243 iter->drawBitmapLattice(bitmap, lattice, dst, paint); in onDrawBitmapLattice()
271 void SkNWayCanvas::onDrawImageLattice(const SkImage* image, const Lattice& lattice, in onDrawImageLattice() argument
275 iter->drawImageLattice(image, lattice, dst, paint); in onDrawImageLattice()
/third_party/flutter/skia/tools/debugger/
DDrawCommand.cpp974 void DrawCommand::MakeJsonLattice(SkJSONWriter& writer, const SkCanvas::Lattice& lattice) { in MakeJsonLattice() argument
976 writer.appendS32(DEBUGCANVAS_ATTRIBUTE_LATTICEXCOUNT, lattice.fXCount); in MakeJsonLattice()
977 writer.appendS32(DEBUGCANVAS_ATTRIBUTE_LATTICEYCOUNT, lattice.fYCount); in MakeJsonLattice()
978 if (nullptr != lattice.fBounds) { in MakeJsonLattice()
980 MakeJsonIRect(writer, *lattice.fBounds); in MakeJsonLattice()
983 for (int i = 0; i < lattice.fXCount; i++) { in MakeJsonLattice()
984 writer.appendS32(lattice.fXDivs[i]); in MakeJsonLattice()
988 for (int i = 0; i < lattice.fYCount; i++) { in MakeJsonLattice()
989 writer.appendS32(lattice.fYDivs[i]); in MakeJsonLattice()
992 if (nullptr != lattice.fRectTypes) { in MakeJsonLattice()
[all …]
/third_party/flutter/skia/include/core/
DSkCanvasVirtualEnforcer.h51 void onDrawImageLattice(const SkImage* image, const SkCanvas::Lattice& lattice,
77 void onDrawBitmapLattice(const SkBitmap& bitmap, const SkCanvas::Lattice& lattice,
/third_party/skia/tools/debugger/
DDrawCommand.cpp946 void DrawCommand::MakeJsonLattice(SkJSONWriter& writer, const SkCanvas::Lattice& lattice) { in MakeJsonLattice() argument
948 writer.appendS32(DEBUGCANVAS_ATTRIBUTE_LATTICEXCOUNT, lattice.fXCount); in MakeJsonLattice()
949 writer.appendS32(DEBUGCANVAS_ATTRIBUTE_LATTICEYCOUNT, lattice.fYCount); in MakeJsonLattice()
950 if (nullptr != lattice.fBounds) { in MakeJsonLattice()
952 MakeJsonIRect(writer, *lattice.fBounds); in MakeJsonLattice()
955 for (int i = 0; i < lattice.fXCount; i++) { in MakeJsonLattice()
956 writer.appendS32(lattice.fXDivs[i]); in MakeJsonLattice()
960 for (int i = 0; i < lattice.fYCount; i++) { in MakeJsonLattice()
961 writer.appendS32(lattice.fYDivs[i]); in MakeJsonLattice()
964 if (nullptr != lattice.fRectTypes) { in MakeJsonLattice()
[all …]

123