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/GrBitmapTextureMaker.cpp b/src/gpu/GrBitmapTextureMaker.cpp
index 5fbfcf1..4ec2b53 100644
--- a/src/gpu/GrBitmapTextureMaker.cpp
+++ b/src/gpu/GrBitmapTextureMaker.cpp
@@ -71,7 +71,9 @@
// We need a mipped proxy, but we either found a proxy earlier that wasn't mipped or
// generated a non mipped proxy. Thus we generate a new mipped surface and copy the original
// proxy into the base layer. We will then let the gpu generate the rest of the mips.
- if (auto mippedProxy = GrCopyBaseMipMapToTextureProxy(this->context(), proxy.get())) {
+ GrColorType srcColorType = SkColorTypeToGrColorType(fBitmap.colorType());
+ if (auto mippedProxy = GrCopyBaseMipMapToTextureProxy(this->context(), proxy.get(),
+ srcColorType)) {
SkASSERT(mippedProxy->origin() == kTopLeft_GrSurfaceOrigin);
if (fOriginalKey.isValid()) {
// In this case we are stealing the key from the original proxy which should only