Home
last modified time | relevance | path

Searched refs:SkVertices (Results 1 – 25 of 157) sorted by relevance

1234567

/external/skqp/tests/
DVerticesTest.cpp14 static bool equal(const SkVertices* v0, const SkVertices* v1) { in equal()
59 const uint32_t texFlags[] = { 0, SkVertices::kHasTexCoords_BuilderFlag }; in DEF_TEST()
60 const uint32_t colFlags[] = { 0, SkVertices::kHasColors_BuilderFlag }; in DEF_TEST()
65 SkVertices::Builder builder(SkVertices::kTriangles_VertexMode, vCount, iCount, flags); in DEF_TEST()
81 sk_sp<SkVertices> v0 = builder.detach(); in DEF_TEST()
83 sk_sp<SkVertices> v1 = SkVertices::Decode(data->data(), data->size()); in DEF_TEST()
94 SkVertices::Builder builder(SkVertices::kTriangleFan_VertexMode, UINT16_MAX + 1, 0, in DEF_TEST()
95 SkVertices::kHasColors_BuilderFlag); in DEF_TEST()
100 SkVertices::Builder builder(SkVertices::kTriangleFan_VertexMode, UINT16_MAX + 2, 0, in DEF_TEST()
101 SkVertices::kHasColors_BuilderFlag); in DEF_TEST()
[all …]
/external/skia/tests/
DVerticesTest.cpp18 static bool equal(const SkVertices* vert0, const SkVertices* vert1) { in equal()
61 static void self_test(sk_sp<SkVertices> v0, skiatest::Reporter* reporter) { in self_test()
69 sk_sp<SkVertices> v1 = SkVerticesPriv::Decode(reader); in self_test()
83 const uint32_t texFlags[] = { 0, SkVertices::kHasTexCoords_BuilderFlag }; in DEF_TEST()
84 const uint32_t colFlags[] = { 0, SkVertices::kHasColors_BuilderFlag }; in DEF_TEST()
89 SkVertices::Builder builder(SkVertices::kTriangles_VertexMode, vCount, iCount, flags); in DEF_TEST()
111 SkVertices::Builder builder(SkVertices::kTriangleFan_VertexMode, UINT16_MAX + 1, 0, in DEF_TEST()
112 SkVertices::kHasColors_BuilderFlag); in DEF_TEST()
117 SkVertices::Builder builder(SkVertices::kTriangleFan_VertexMode, UINT16_MAX + 2, 0, in DEF_TEST()
118 SkVertices::kHasColors_BuilderFlag); in DEF_TEST()
[all …]
/external/skqp/src/core/
DSkVertices.cpp29 struct SkVertices::Sizes {
30 Sizes(SkVertices::VertexMode mode, int vertexCount, int indexCount, bool hasTexs, in Sizes()
63 fTotal = safe.add(sizeof(SkVertices), in Sizes()
72 fArrays = fTotal - sizeof(SkVertices); // just the sum of the arrays in Sizes()
94 SkVertices::Builder::Builder(VertexMode mode, int vertexCount, int indexCount, in Builder()
96 bool hasTexs = SkToBool(builderFlags & SkVertices::kHasTexCoords_BuilderFlag); in Builder()
97 bool hasColors = SkToBool(builderFlags & SkVertices::kHasColors_BuilderFlag); in Builder()
98 bool hasBones = SkToBool(builderFlags & SkVertices::kHasBones_BuilderFlag); in Builder()
99 bool isVolatile = !SkToBool(builderFlags & SkVertices::kIsNonVolatile_BuilderFlag); in Builder()
101 SkVertices::Sizes(mode, vertexCount, indexCount, hasTexs, hasColors, hasBones)); in Builder()
[all …]
DSkVertState.cpp95 VertState::Proc VertState::chooseProc(SkVertices::VertexMode mode) { in chooseProc()
97 case SkVertices::kTriangles_VertexMode: in chooseProc()
99 case SkVertices::kTriangleStrip_VertexMode: in chooseProc()
101 case SkVertices::kTriangleFan_VertexMode: in chooseProc()
DSkDraw.h65 void drawVertices(SkVertices::VertexMode mode, int vertexCount,
67 const SkColor colors[], const SkVertices::BoneIndices boneIndices[],
68 const SkVertices::BoneWeights boneWeights[], SkBlendMode bmode,
70 const SkPaint& paint, const SkVertices::Bone bones[], int boneCount) const;
/external/skia/src/core/
DSkVertices.cpp32 struct SkVertices::Desc {
40 struct SkVertices::Sizes {
71 fTotal = safe.add(sizeof(SkVertices), in Sizes()
98 SkVertices::Builder::Builder(VertexMode mode, int vertexCount, int indexCount, in Builder()
100 bool hasTexs = SkToBool(builderFlags & SkVertices::kHasTexCoords_BuilderFlag); in Builder()
101 bool hasColors = SkToBool(builderFlags & SkVertices::kHasColors_BuilderFlag); in Builder()
105 SkVertices::Builder::Builder(const Desc& desc) { in Builder()
109 void SkVertices::Builder::init(const Desc& desc) { in init()
121 fVertices.reset(new (storage) SkVertices); in init()
124 char* ptr = (char*)storage + sizeof(SkVertices); in init()
[all …]
DSkVerticesPriv.h23 SkVertices::VertexMode mode() const { return fVertices->fMode; } in mode()
41 static sk_sp<SkVertices> Decode(SkReadBuffer&);
44 explicit SkVerticesPriv(SkVertices* vertices) : fVertices(vertices) {} in SkVerticesPriv()
51 SkVertices* fVertices;
53 friend class SkVertices; // to construct this type variable
56 inline SkVerticesPriv SkVertices::priv() { return SkVerticesPriv(this); } in priv()
58 inline const SkVerticesPriv SkVertices::priv() const { // NOLINT(readability-const-return-type) in priv()
59 return SkVerticesPriv(const_cast<SkVertices*>(this)); in priv()
DSkVertState.cpp95 VertState::Proc VertState::chooseProc(SkVertices::VertexMode mode) { in chooseProc()
97 case SkVertices::kTriangles_VertexMode: in chooseProc()
99 case SkVertices::kTriangleStrip_VertexMode: in chooseProc()
101 case SkVertices::kTriangleFan_VertexMode: in chooseProc()
/external/skqp/gm/
Dskinning.cpp22 static const SkVertices::Bone kBones[] = {
45 static const SkVertices::BoneIndices kBoneIndices[] = {
51 static const SkVertices::BoneWeights kBoneWeights[] = {
65 static void swap(const SkVertices::Bone** x, const SkVertices::Bone** y) { in swap()
66 const SkVertices::Bone* temp = *x; in swap()
102 fVertices = SkVertices::MakeCopy(SkVertices::kTriangles_VertexMode, in onOnceBeforeDraw()
120 const SkVertices::Bone* bones[kBoneCount]; in onDraw()
133 const SkVertices::Bone** bones, in drawPermutations()
140 SkVertices::Bone copiedBones[kBoneCount]; in drawPermutations()
151 sk_sp<SkVertices> vertices = fVertices->applyBones(copiedBones, in drawPermutations()
[all …]
Dvertices.cpp171 auto v = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode, in onDraw()
198 SkVertices::Builder builder(SkVertices::kTriangles_VertexMode, kMeshVertexCnt, 3 * kNumTris, in draw_batching()
199 SkVertices::kHasColors_BuilderFlag | in draw_batching()
200 SkVertices::kHasTexCoords_BuilderFlag); in draw_batching()
236 auto v = SkVertices::MakeCopy(SkVertices::kTriangles_VertexMode, kMeshVertexCnt, in draw_batching()
/external/skia/include/core/
DSkVertices.h22 class SK_API SkVertices : public SkNVRefCnt<SkVertices> {
38 static sk_sp<SkVertices> MakeCopy(VertexMode mode, int vertexCount,
45 static sk_sp<SkVertices> MakeCopy(VertexMode mode, int vertexCount, in MakeCopy()
76 sk_sp<SkVertices> detach();
84 sk_sp<SkVertices> fVertices;
89 friend class SkVertices; variable
104 SkVertices() {} in SkVertices() function
109 friend class SkNVRefCnt<SkVertices>;
/external/skqp/include/core/
DSkVertices.h20 class SK_API SkVertices : public SkNVRefCnt<SkVertices> {
112 static sk_sp<SkVertices> MakeCopy(VertexMode mode, int vertexCount,
122 static sk_sp<SkVertices> MakeCopy(VertexMode mode, int vertexCount,
141 static sk_sp<SkVertices> MakeCopy(VertexMode mode, int vertexCount,
160 static sk_sp<SkVertices> MakeCopy(VertexMode mode, int vertexCount,
194 sk_sp<SkVertices> detach();
202 sk_sp<SkVertices> fVertices;
207 friend class SkVertices; variable
232 sk_sp<SkVertices> applyBones(const Bone bones[], int boneCount) const;
241 static sk_sp<SkVertices> Decode(const void* buffer, size_t length);
[all …]
/external/skqp/src/gpu/ops/
DGrDrawVerticesOp.h22 class SkVertices; variable
40 sk_sp<SkVertices>,
41 const SkVertices::Bone bones[],
48 GrDrawVerticesOp(const Helper::MakeArgs&, const SkPMColor4f&, sk_sp<SkVertices>,
49 const SkVertices::Bone bones[], int boneCount, GrPrimitiveType, GrAAType,
107 sk_sp<SkVertices> fVertices;
156 std::vector<SkVertices::Bone> fBones; // Bone transformation matrices.
DGrDrawVerticesOp.cpp17 sk_sp<SkVertices> vertices, in Make()
18 const SkVertices::Bone bones[], in Make()
33 sk_sp<SkVertices> vertices, const SkVertices::Bone bones[], in GrDrawVerticesOp()
101 const SkVertices::Bone& matrix = bones[i]; in GrDrawVerticesOp()
381 const SkVertices::BoneIndices* boneIndices = mesh.fVertices->boneIndices(); in fillBuffers()
382 const SkVertices::BoneWeights* boneWeights = mesh.fVertices->boneWeights(); in fillBuffers()
445 const SkVertices::BoneIndices& indices = boneIndices[j]; in fillBuffers()
446 const SkVertices::BoneWeights& weights = boneWeights[j]; in fillBuffers()
644 static constexpr SkVertices::VertexMode kIgnoredMode = SkVertices::kTriangles_VertexMode; in GR_DRAW_OP_TEST_DEFINE()
645 sk_sp<SkVertices> vertices = SkVertices::MakeCopy(kIgnoredMode, vertexCount, positions.begin(), in GR_DRAW_OP_TEST_DEFINE()
/external/skia/docs/examples/
Ddraw_vertices.cpp13 SkVertices::MakeCopy(SkVertices::kTriangles_VertexMode, 3, pts, nullptr, colors), in draw()
21 SkVertices::MakeCopy(SkVertices::kTriangles_VertexMode, 3, pts, texs, nullptr), in draw()
DCanvas_drawVertices.cpp10 auto vertices = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode, in draw()
/external/skqp/experimental/nima/
DNimaActor.h119 std::vector<SkVertices::BoneIndices> fBoneIdx;
120 std::vector<SkVertices::BoneWeights> fBoneWgt;
123 std::vector<SkVertices::Bone> fBones;
124 sk_sp<SkVertices> fVertices;
130 void drawVerticesObject(SkVertices* vertices, SkCanvas* canvas, bool useBones) const;
/external/skia/gm/
Dvertices.cpp192 auto v = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode, in onDraw()
219 SkVertices::Builder builder(SkVertices::kTriangles_VertexMode, kMeshVertexCnt, 3 * kNumTris, in draw_batching()
220 SkVertices::kHasColors_BuilderFlag | in draw_batching()
221 SkVertices::kHasTexCoords_BuilderFlag); in draw_batching()
257 auto v = SkVertices::MakeCopy(SkVertices::kTriangles_VertexMode, kMeshVertexCnt, in draw_batching()
285 auto verts = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode, 4, pos, pos, nullptr);
/external/skqp/src/utils/
DSkShadowUtils.cpp95 sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm, in makeVertices()
153 sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm, in makeVertices()
186 sk_sp<SkVertices> find(const AmbientVerticesFactory& ambient, const SkMatrix& matrix, in find()
191 sk_sp<SkVertices> add(const SkPath& devPath, const AmbientVerticesFactory& ambient, in add()
196 sk_sp<SkVertices> find(const SpotVerticesFactory& spot, const SkMatrix& matrix, in find()
201 sk_sp<SkVertices> add(const SkPath& devPath, const SpotVerticesFactory& spot, in add()
212 sk_sp<SkVertices> find(const FACTORY& factory, const SkMatrix& matrix, in find()
233 sk_sp<SkVertices> add(const SkPath& path, const FACTORY& factory, const SkMatrix& matrix, in add()
235 sk_sp<SkVertices> vertices = factory.makeVertices(path, matrix, translate); in add()
256 sk_sp<SkVertices> fVertices;
[all …]
DSkShadowTessellator.h18 class SkVertices; variable
29 sk_sp<SkVertices> MakeAmbient(const SkPath& path, const SkMatrix& ctm,
37 sk_sp<SkVertices> MakeSpot(const SkPath& path, const SkMatrix& ctm, const SkPoint3& zPlane,
/external/skia/src/utils/
DSkShadowTessellator.h19 class SkVertices; variable
30 sk_sp<SkVertices> MakeAmbient(const SkPath& path, const SkMatrix& ctm,
38 sk_sp<SkVertices> MakeSpot(const SkPath& path, const SkMatrix& ctm, const SkPoint3& zPlane,
DSkShadowUtils.cpp120 sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm, in makeVertices()
182 sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm, in makeVertices()
220 sk_sp<SkVertices> find(const AmbientVerticesFactory& ambient, const SkMatrix& matrix, in find()
225 sk_sp<SkVertices> add(const SkPath& devPath, const AmbientVerticesFactory& ambient, in add()
230 sk_sp<SkVertices> find(const SpotVerticesFactory& spot, const SkMatrix& matrix, in find()
235 sk_sp<SkVertices> add(const SkPath& devPath, const SpotVerticesFactory& spot, in add()
246 sk_sp<SkVertices> find(const FACTORY& factory, const SkMatrix& matrix, in find()
267 sk_sp<SkVertices> add(const SkPath& path, const FACTORY& factory, const SkMatrix& matrix, in add()
269 sk_sp<SkVertices> vertices = factory.makeVertices(path, matrix, translate); in add()
290 sk_sp<SkVertices> fVertices;
[all …]
/external/skqp/src/gpu/
DSkGr.h140 static inline GrPrimitiveType SkVertexModeToGrPrimitiveType(SkVertices::VertexMode mode) { in SkVertexModeToGrPrimitiveType()
142 case SkVertices::kTriangles_VertexMode: in SkVertexModeToGrPrimitiveType()
144 case SkVertices::kTriangleStrip_VertexMode: in SkVertexModeToGrPrimitiveType()
146 case SkVertices::kTriangleFan_VertexMode: in SkVertexModeToGrPrimitiveType()
/external/skia/src/gpu/ops/
DGrDrawVerticesOp.cpp213 DrawVerticesOp(GrProcessorSet*, const SkPMColor4f&, sk_sp<SkVertices>,
261 sk_sp<SkVertices> fVertices;
309 sk_sp<SkVertices> vertices, in DrawVerticesOp()
579 static GrPrimitiveType SkVertexModeToGrPrimitiveType(SkVertices::VertexMode mode) { in SkVertexModeToGrPrimitiveType()
581 case SkVertices::kTriangles_VertexMode: in SkVertexModeToGrPrimitiveType()
583 case SkVertices::kTriangleStrip_VertexMode: in SkVertexModeToGrPrimitiveType()
585 case SkVertices::kTriangleFan_VertexMode: in SkVertexModeToGrPrimitiveType()
593 sk_sp<SkVertices> vertices, in Make()
717 static constexpr SkVertices::VertexMode kIgnoredMode = SkVertices::kTriangles_VertexMode; in GR_DRAW_OP_TEST_DEFINE()
718 sk_sp<SkVertices> vertices = SkVertices::MakeCopy(kIgnoredMode, vertexCount, positions.begin(), in GR_DRAW_OP_TEST_DEFINE()
/external/skqp/experimental/canvaskit/
Dcanvaskit_bindings.cpp66 using BoneIndices = SkVertices::BoneIndices;
67 using BoneWeights = SkVertices::BoneWeights;
68 using Bone = SkVertices::Bone;
481 void raw_destructor<SkVertices>(SkVertices *ptr) { in raw_destructor()
641 function("_MakeSkVertices", optional_override([](SkVertices::VertexMode mode, int vertexCount, in EMSCRIPTEN_BINDINGS()
645 … int indexCount, uintptr_t /* uint16_t * */ iPtr)->sk_sp<SkVertices> { in EMSCRIPTEN_BINDINGS()
654 return SkVertices::MakeCopy(mode, vertexCount, positions, texs, colors, in EMSCRIPTEN_BINDINGS()
702 ….function("drawVertices", select_overload<void (const sk_sp<SkVertices>&, SkBlendMode, const SkPai… in EMSCRIPTEN_BINDINGS()
907 class_<SkVertices>("SkVertices") in EMSCRIPTEN_BINDINGS()
908 .smart_ptr<sk_sp<SkVertices>>("sk_sp<SkVertices>") in EMSCRIPTEN_BINDINGS()
[all …]

1234567