Reland "Convert GrDitherEffect to a runtime FP"
This reverts commit 3dd52c758b6cbcf1bf6eca1d0a594195e770d2ef.
Change-Id: Ie873ad570ffc57b3edd6ffe8612cbc2c73d40450
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424259
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/tests/SkRuntimeEffectTest.cpp b/tests/SkRuntimeEffectTest.cpp
index 9c29383..13fb550 100644
--- a/tests/SkRuntimeEffectTest.cpp
+++ b/tests/SkRuntimeEffectTest.cpp
@@ -79,8 +79,7 @@
DEF_TEST(SkRuntimeEffectCanDisableES2Restrictions, r) {
auto test_valid_es3 = [](skiatest::Reporter* r, const char* sksl) {
- SkRuntimeEffect::Options opt;
- opt.enforceES2Restrictions = false;
+ SkRuntimeEffect::Options opt = SkRuntimeEffectPriv::ES3Options();
auto [effect, errorText] = SkRuntimeEffect::MakeForShader(SkString(sksl), opt);
REPORTER_ASSERT(r, effect, "%s", errorText.c_str());
};
diff --git a/tests/SkSLTest.cpp b/tests/SkSLTest.cpp
index 45812fc..c388a43 100644
--- a/tests/SkSLTest.cpp
+++ b/tests/SkSLTest.cpp
@@ -19,6 +19,7 @@
#include "include/effects/SkRuntimeEffect.h"
#include "include/private/SkSLDefines.h" // for kDefaultInlineThreshold
#include "include/utils/SkRandom.h"
+#include "src/core/SkRuntimeEffectPriv.h"
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrDirectContextPriv.h"
#include "tests/Test.h"
@@ -98,8 +99,8 @@
SkSurface* surface,
const char* testFile,
bool worksInES2) {
- SkRuntimeEffect::Options options;
- options.enforceES2Restrictions = worksInES2;
+ SkRuntimeEffect::Options options =
+ worksInES2 ? SkRuntimeEffect::Options{} : SkRuntimeEffectPriv::ES3Options();
options.forceNoInline = false;
test_one_permutation(r, surface, testFile, "", options);