Clean up GrContext references in the src/gpu
This CL tries to remove all uses of GrContext - replacing them with
either GrDirectContext or GrRecordingContext. Preferring the recording
context wherever possible.
Change-Id: I61af94928aa37bc82ff9923acffd57586610f695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302904
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
diff --git a/src/gpu/effects/generated/GrConfigConversionEffect.cpp b/src/gpu/effects/generated/GrConfigConversionEffect.cpp
index 1ad460d..7018bb7 100644
--- a/src/gpu/effects/generated/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/generated/GrConfigConversionEffect.cpp
@@ -27,7 +27,7 @@
(void)pmConversion;
fragBuilder->forceHighPrecision();
- SkString _sample5730 = this->invokeChild(0, args);
+ SkString _sample5748 = this->invokeChild(0, args);
fragBuilder->codeAppendf(
R"SkSL(%s = floor(%s * 255.0 + 0.5) / 255.0;
@switch (%d) {
@@ -39,7 +39,7 @@
break;
}
)SkSL",
- args.fOutputColor, _sample5730.c_str(), (int)_outer.pmConversion, args.fOutputColor,
+ args.fOutputColor, _sample5748.c_str(), (int)_outer.pmConversion, args.fOutputColor,
args.fOutputColor, args.fOutputColor, args.fOutputColor, args.fOutputColor,
args.fOutputColor, args.fOutputColor);
}
@@ -80,7 +80,7 @@
}
#endif
-bool GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context) {
+bool GrConfigConversionEffect::TestForPreservingPMConversions(GrDirectContext* context) {
static constexpr int kSize = 256;
static constexpr GrColorType kColorType = GrColorType::kRGBA_8888;
SkAutoTMalloc<uint32_t> data(kSize * kSize * 3);