Add sk_runtimeeffect_make_image_filter C API functions#202
Open
mattleibow wants to merge 5 commits into
Open
Conversation
e15df7a to
7a3037d
Compare
Add two new C API functions for creating image filters from runtime shaders: - sk_imagefilter_new_runtime_shader: single-child variant - sk_imagefilter_new_runtime_shader_with_children: multi-child with maxSampleRadius Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename and relocate from sk_imagefilter_new_runtime_shader* to sk_runtimeeffect_make_image_filter* to match the existing pattern of sk_runtimeeffect_make_shader/color_filter/blender. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove children/childCount from sk_runtimeeffect_make_image_filter* since these are not used in practice for image filters. Replace std::vector with STArray for stack-backed small allocations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Children parameter is passed through to the builder for future use with static shader/blender/colorfilter children alongside image filter inputs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pass sampleRadius through to C++ RuntimeShader single-child path instead of defaulting to 0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d1c7a67 to
b0ad677
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.
Add two C API functions for creating image filters from runtime shader effects:
sk_runtimeeffect_make_image_filter— single-child variant withmaxSampleRadius,childShaderName(auto-detect if empty), optionalinputfilter, and builderchildrenfor static child slotssk_runtimeeffect_make_image_filter_with_children— multi-child variant with parallelchildShaderNames/inputsarrays,maxSampleRadius, and builderchildrenBoth reconstruct an
SkRuntimeEffectBuilderfrom decomposed C API parameters and callSkImageFilters::RuntimeShader. Multi-child path usesskia_private::STArray<4>for stack-backed allocations.Fixes mono/SkiaSharp#3776