Clean up for DDL program pre-compilation
This CL:
1) Fixes a GrTexture access in GrTextureEffect that was blocking pre-compilation
2) Adds program pre-compilation to the DDL Via - which would've caught the GrTextureEffect problem on the bots
3) Adds some #if'ed out code for collecting program pre-compilation stats
Bug: skia:9455
Change-Id: Ibcb07ae855b7a644e1f22c3427a928f116ab300d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275336
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/effects/GrTextureEffect.cpp b/src/gpu/effects/GrTextureEffect.cpp
index 490aac1..e0bea52 100644
--- a/src/gpu/effects/GrTextureEffect.cpp
+++ b/src/gpu/effects/GrTextureEffect.cpp
@@ -265,8 +265,8 @@
fb->ensureCoords2D(args.fTransformedCoords[0].fVaryingPoint).c_str());
const auto& m = te.fShaderModes;
- const auto* texture = te.fSampler.proxy()->peekTexture();
- bool normCoords = texture->texturePriv().textureType() != GrTextureType::kRectangle;
+ GrTextureType textureType = te.fSampler.proxy()->backendFormat().textureType();
+ bool normCoords = textureType != GrTextureType::kRectangle;
auto filter = te.fSampler.samplerState().filter();
FilterLogic filterLogic[2] = {GetFilterLogic(m[0], filter),
GetFilterLogic(m[1], filter)};