Plumb GrColorType through all ops/processors that sample textures.
This change also allows for the remove of GrPixelConfigIsOpaque function.
Bug: skia:6718
Change-Id: I7e7b70f02d911eda67640d648fb6348091e0f55d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248698
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrProcessorUnitTest.h b/src/gpu/GrProcessorUnitTest.h
index 0e9392a..6b0443e 100644
--- a/src/gpu/GrProcessorUnitTest.h
+++ b/src/gpu/GrProcessorUnitTest.h
@@ -51,13 +51,16 @@
GrProcessorTestData(SkRandom* random,
GrContext* context,
const GrRenderTargetContext* renderTargetContext,
- sk_sp<GrTextureProxy> proxies[2])
+ sk_sp<GrTextureProxy> proxies[2],
+ GrColorType proxyColorTypes[2])
: fRandom(random)
, fRenderTargetContext(renderTargetContext)
, fContext(context) {
SkASSERT(proxies[0] && proxies[1]);
fProxies[0] = proxies[0];
fProxies[1] = proxies[1];
+ fProxyColorTypes[0] = proxyColorTypes[0];
+ fProxyColorTypes[1] = proxyColorTypes[1];
}
SkRandom* fRandom;
const GrRenderTargetContext* fRenderTargetContext;
@@ -67,10 +70,12 @@
GrProxyProvider* proxyProvider();
const GrCaps* caps();
sk_sp<GrTextureProxy> textureProxy(int index) { return fProxies[index]; }
+ GrColorType textureProxyColorType(int index) { return fProxyColorTypes[index]; }
private:
GrContext* fContext;
sk_sp<GrTextureProxy> fProxies[2];
+ GrColorType fProxyColorTypes[2];
};
class GrProcessor;