Add SkMesh C API for mesh specification, buffers, and canvas drawMesh#203
Draft
mattleibow wants to merge 1 commit into
Draft
Add SkMesh C API for mesh specification, buffers, and canvas drawMesh#203mattleibow wants to merge 1 commit into
mattleibow wants to merge 1 commit into
Conversation
3 tasks
…vas drawMesh Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
419c859 to
5df1849
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the C API shim for Skia's SkMesh, enabling custom vertex mesh drawing with SkSL shaders.
New functions
Mesh Specification:
sk_meshspecification_make— create from attributes, varyings, stride, and SkSL programssk_meshspecification_ref/unref— NVRefCnt managementsk_meshspecification_get_stride,sk_meshspecification_get_uniform_byte_sizeBuffers:
sk_mesh_vertex_buffer_make/copy/get_sizesk_mesh_index_buffer_make/copy/get_sizeMesh:
sk_mesh_make— non-indexed meshsk_mesh_make_indexed— indexed meshsk_mesh_delete,sk_mesh_get_is_validCanvas:
sk_canvas_draw_meshFiles changed
include/c/sk_types.h— opaque types, enums, structsinclude/c/sk_mesh.h— new headerinclude/c/sk_canvas.h— drawMesh declarationsrc/c/sk_mesh.cpp— new implementationsrc/c/sk_canvas.cpp— drawMesh implementationsrc/c/sk_types_priv.h— DEF_CLASS_MAP + As/To helperssrc/xamarin/SkiaKeeper.c— symbol retentiongn/core.gni— build entriesCompanion to mono/SkiaSharp#3777