39 const void*
src)
const {
46 for (
size_t uniformIdx = 0; uniformIdx < uniforms.
size(); ++uniformIdx) {
47 const auto& u = uniforms[uniformIdx];
48 auto floatData = [=] {
return SkTAddOffset<const float>(
src, u.offset); };
49 auto intData = [=] {
return SkTAddOffset<const int >(
src, u.offset); };
53 const auto h = handles[handleIdx++];
55 case Type::kFloat: this->
set1fv(
h, u.count, floatData());
break;
56 case Type::kFloat2: this->
set2fv(
h, u.count, floatData());
break;
57 case Type::kFloat3: this->
set3fv(
h, u.count, floatData());
break;
58 case Type::kFloat4: this->
set4fv(
h, u.count, floatData());
break;
60 case Type::kFloat2x2: this->
setMatrix2fv(
h, u.count, floatData());
break;
61 case Type::kFloat3x3: this->
setMatrix3fv(
h, u.count, floatData());
break;
62 case Type::kFloat4x4: this->
setMatrix4fv(
h, u.count, floatData());
break;
64 case Type::kInt: this->
set1iv(
h, u.count, intData());
break;
65 case Type::kInt2: this->
set2iv(
h, u.count, intData());
break;
66 case Type::kInt3: this->
set3iv(
h, u.count, intData());
break;
67 case Type::kInt4: this->
set4iv(
h, u.count, intData());
break;
#define SkDEBUGFAIL(message)
void setRuntimeEffectUniforms(SkSpan< const SkRuntimeEffect::Uniform >, SkSpan< const UniformHandle >, SkSpan< const Specialized >, const void *src) const
virtual void set4fv(UniformHandle, int arrayCount, const float v[]) const =0
virtual void set3fv(UniformHandle, int arrayCount, const float v[]) const =0
void setSkMatrix(UniformHandle, const SkMatrix &) const
virtual void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) const =0
virtual void setMatrix3f(UniformHandle, const float matrix[]) const =0
virtual void set1fv(UniformHandle, int arrayCount, const float v[]) const =0
virtual void set4iv(UniformHandle, int arrayCount, const int v[]) const =0
virtual void set1iv(UniformHandle, int arrayCount, const int v[]) const =0
virtual void set2fv(UniformHandle, int arrayCount, const float v[]) const =0
virtual void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) const =0
virtual void set3iv(UniformHandle, int arrayCount, const int v[]) const =0
void setSkM44(UniformHandle, const SkM44 &) const
virtual void set2iv(UniformHandle, int arrayCount, const int v[]) const =0
virtual void setMatrix4f(UniformHandle, const float matrix[]) const =0
virtual void setMatrix2fv(UniformHandle, int arrayCount, const float matrices[]) const =0
static const SkScalar * M44ColMajor(const SkM44 &m)
static constexpr int kMScaleX
horizontal scale factor
static constexpr int kMTransY
vertical translation
static constexpr int kMPersp1
input y perspective factor
static constexpr int kMPersp0
input x perspective factor
static constexpr int kMPersp2
perspective bias
static constexpr int kMTransX
horizontal translation
static constexpr int kMSkewY
vertical skew factor
static constexpr int kMScaleY
vertical scale factor
static constexpr int kMSkewX
horizontal skew factor
constexpr bool empty() const
constexpr size_t size() const
unsigned useCenter Optional< SkMatrix > matrix