Revert "Revert "Make FP optimizations helpers use SkAlphaType not GrColorType""
This reverts commit 078e8faa26d8b1f33a92e57f587be011150d1776.
Change-Id: I67b2970584db5a1afbf9928b77c5444947ef71a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255897
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp
index ce5c49b..c3b3649 100644
--- a/src/gpu/SkGpuDevice_drawTexture.cpp
+++ b/src/gpu/SkGpuDevice_drawTexture.cpp
@@ -220,14 +220,15 @@
SkPoint srcQuad[4];
GrMapRectPoints(dstRect, srcRect, dstClip, srcQuad, 4);
- rtc->drawTextureQuad(clip, std::move(proxy), srcColorInfo.colorType(), filter,
- paint.getBlendMode(), color, srcQuad, dstClip, aa, aaFlags,
+ rtc->drawTextureQuad(clip, std::move(proxy), srcColorInfo.colorType(),
+ srcColorInfo.alphaType(), filter, paint.getBlendMode(), color, srcQuad,
+ dstClip, aa, aaFlags,
constraint == SkCanvas::kStrict_SrcRectConstraint ? &srcRect : nullptr,
ctm, std::move(textureXform));
} else {
- rtc->drawTexture(clip, std::move(proxy), srcColorInfo.colorType(), filter,
- paint.getBlendMode(), color, srcRect, dstRect, aa, aaFlags, constraint,
- ctm, std::move(textureXform));
+ rtc->drawTexture(clip, std::move(proxy), srcColorInfo.colorType(), srcColorInfo.alphaType(),
+ filter, paint.getBlendMode(), color, srcRect, dstRect, aa, aaFlags,
+ constraint, ctm, std::move(textureXform));
}
}
@@ -555,7 +556,7 @@
GrSurfaceOrigin origin = proxy->origin();
const GrSwizzle& swizzle = proxy->textureSwizzle();
textures[i].fProxyView = {std::move(proxy), origin, swizzle};
- textures[i].fSrcColorType = SkColorTypeToGrColorType(image->colorType());
+ textures[i].fSrcAlphaType = image->alphaType();
textures[i].fSrcRect = set[i].fSrcRect;
textures[i].fDstRect = set[i].fDstRect;
textures[i].fDstClipQuad = clip;