Pass GrColorType to the GrGpu::wrapRenderableBackendTexture chain of calls (take 2)
This is a step towards reducing our reliance-on/use-of the GrPixelConfig stored in the GrBackendTexture.
TBR=egdaniel@google.com
Bug: skia:6718
Change-Id: I316a98416c51f273e6ab578f9cbaea5f7adfe331
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227639
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/mock/GrMockGpu.cpp b/src/gpu/mock/GrMockGpu.cpp
index aa975cd..898aa7e 100644
--- a/src/gpu/mock/GrMockGpu.cpp
+++ b/src/gpu/mock/GrMockGpu.cpp
@@ -132,11 +132,13 @@
sk_sp<GrTexture> GrMockGpu::onWrapRenderableBackendTexture(const GrBackendTexture& tex,
int sampleCnt,
+ GrColorType colorType,
GrWrapOwnership ownership,
GrWrapCacheable cacheable) {
GrMockTextureInfo texInfo;
SkAssertResult(tex.getMockTextureInfo(&texInfo));
+ SkASSERT(colorType == texInfo.fColorType);
GrSurfaceDesc desc;
desc.fFlags = kRenderTarget_GrSurfaceFlag;
desc.fWidth = tex.width();