adadb95a9f
This does a few things, because they're all intertwined: 1) SkRuntimeEffect's API now includes details about children (which Skia stage was declared, not just the name). The factories verify that the declared types in the SkSL match up with the C++ types being passed. Today, we still only support adding children of the same type, so the checks are simple. Once we allow mixing types, we'll be testing the declared type against the actual C++ type supplied for each slot. 2) Adds sample variants that supply the input color to the child. This is now the only way to invoke a colorFilter child. Internally, we support passing a color when invoking a child shader, but I'm not exposing that. It's not clearly part of the semantics of the Skia pipeline, and is almost never useful. It also exposes users to several inconsistencies (skbug.com/11942). 3) Because of #2, it's possible that we can't compute a reusable program to filter individual colors. In that case, we don't set the constant output for constant input optimization, and filterColor4f falls back to the slower base-class implementation. Bug: skia:11813 skia:11942 Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> |
||
---|---|---|
.. | ||
Sk1DPathEffect.h | ||
Sk2DPathEffect.h | ||
SkBlurDrawLooper.h | ||
SkBlurMaskFilter.h | ||
SkColorMatrix.h | ||
SkColorMatrixFilter.h | ||
SkCornerPathEffect.h | ||
SkDashPathEffect.h | ||
SkDiscretePathEffect.h | ||
SkGradientShader.h | ||
SkHighContrastFilter.h | ||
SkImageFilters.h | ||
SkLayerDrawLooper.h | ||
SkLumaColorFilter.h | ||
SkOpPathEffect.h | ||
SkOverdrawColorFilter.h | ||
SkPerlinNoiseShader.h | ||
SkRuntimeEffect.h | ||
SkShaderMaskFilter.h | ||
SkStrokeAndFillPathEffect.h | ||
SkTableColorFilter.h | ||
SkTableMaskFilter.h | ||
SkTrimPathEffect.h |