10 sk_sp<DlRuntimeEffect> runtime_effect,
11 std::vector<std::shared_ptr<DlColorSource>> samplers,
12 std::shared_ptr<std::vector<uint8_t>> uniform_data)
13 : runtime_effect_(
std::move(runtime_effect)),
14 samplers_(
std::move(samplers)),
15 uniform_data_(
std::move(uniform_data)) {}
18 return std::make_shared<DlRuntimeEffectColorSource>(runtime_effect_,
24 for (
const auto& sampler : samplers_) {
25 if (!sampler->isUIThreadSafe()) {
35 if (runtime_effect_ != that->runtime_effect_) {
38 if (uniform_data_ != that->uniform_data_) {
41 if (samplers_.size() != that->samplers_.size()) {
44 for (
size_t i = 0;
i < samplers_.size();
i++) {
45 if (samplers_[
i] != that->samplers_[
i]) {
virtual T type() const =0
std::shared_ptr< DlColorSource > shared() const override
DlRuntimeEffectColorSource(sk_sp< DlRuntimeEffect > runtime_effect, std::vector< std::shared_ptr< DlColorSource > > samplers, std::shared_ptr< std::vector< uint8_t > > uniform_data)
bool isUIThreadSafe() const override
If the underlying platform data held by this object is held in a way that it can be stored and potent...
bool equals_(DlColorSource const &other) const override
#define FML_DCHECK(condition)