Revert "Validate argument types to GrSkSLFP::Make (in debug builds)"
This reverts commit 43c713d5cd
.
Reason for revert: Debian10 bots
Original change's description:
> Validate argument types to GrSkSLFP::Make (in debug builds)
>
> Change-Id: I399e6b30c85ce19f6af94baca60ac998d9673e61
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416999
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,johnstiles@google.com
Change-Id: I58c45c35cfe7072b01e96967a418cbcc97d3c703
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417196
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
2cd060b283
commit
5cde40de53
@ -116,26 +116,7 @@ private:
|
||||
}
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
// Validates that all args passed to the template factory have the right names, sizes, and types
|
||||
template <typename T> struct uniform_type {
|
||||
template <typename U>
|
||||
struct add_a_UNIFORM_TYPE_specialization_for {};
|
||||
static constexpr add_a_UNIFORM_TYPE_specialization_for<T> value;
|
||||
};
|
||||
#define UNIFORM_TYPE(T, E) \
|
||||
template <> struct uniform_type<T> { \
|
||||
static constexpr SkRuntimeEffect::Uniform::Type value = \
|
||||
SkRuntimeEffect::Uniform::Type::E; \
|
||||
}
|
||||
|
||||
UNIFORM_TYPE(float, kFloat);
|
||||
UNIFORM_TYPE(SkV2, kFloat2);
|
||||
UNIFORM_TYPE(SkPMColor4f, kFloat4);
|
||||
UNIFORM_TYPE(SkV4, kFloat4);
|
||||
UNIFORM_TYPE(int, kInt);
|
||||
|
||||
#undef UNIFORM_TYPE
|
||||
|
||||
// Validates that all args passed to the template factory have the right names and sizes
|
||||
using child_iterator = std::vector<SkRuntimeEffect::Child>::const_iterator;
|
||||
using uniform_iterator = std::vector<SkRuntimeEffect::Uniform>::const_iterator;
|
||||
static void checkArgs(uniform_iterator uIter,
|
||||
@ -177,9 +158,6 @@ private:
|
||||
SkASSERTF(uIter->sizeInBytes() == sizeof(val),
|
||||
"Expected uniform '%s' to be %zu bytes, got %zu instead",
|
||||
name, uIter->sizeInBytes(), sizeof(val));
|
||||
SkASSERTF(uniform_type<T>::value == uIter->type,
|
||||
"Wrong type for uniform '%s'",
|
||||
name);
|
||||
checkArgs(++uIter, uEnd, cIter, cEnd, std::forward<Args>(remainder)...);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user