Reland "Revert "Make FP optimizations helpers use SkAlphaType not GrColorType""
This reverts commit 997b37fdb986b45ff9941319b0111b188e749cfc.
Reason for revert: May be blocking Chrome roll
Original change's description:
> 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>
TBR=egdaniel@google.com,bsalomon@google.com
Change-Id: I0d2754ac7f4672f0758e4d00cd9e06998637846a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256196
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp
index c3b3649..ce5c49b 100644
--- a/src/gpu/SkGpuDevice_drawTexture.cpp
+++ b/src/gpu/SkGpuDevice_drawTexture.cpp
@@ -220,15 +220,14 @@
SkPoint srcQuad[4];
GrMapRectPoints(dstRect, srcRect, dstClip, srcQuad, 4);
- rtc->drawTextureQuad(clip, std::move(proxy), srcColorInfo.colorType(),
- srcColorInfo.alphaType(), filter, paint.getBlendMode(), color, srcQuad,
- dstClip, aa, aaFlags,
+ rtc->drawTextureQuad(clip, std::move(proxy), srcColorInfo.colorType(), 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(), srcColorInfo.alphaType(),
- filter, paint.getBlendMode(), color, srcRect, dstRect, aa, aaFlags,
- constraint, ctm, std::move(textureXform));
+ rtc->drawTexture(clip, std::move(proxy), srcColorInfo.colorType(), filter,
+ paint.getBlendMode(), color, srcRect, dstRect, aa, aaFlags, constraint,
+ ctm, std::move(textureXform));
}
}
@@ -556,7 +555,7 @@
GrSurfaceOrigin origin = proxy->origin();
const GrSwizzle& swizzle = proxy->textureSwizzle();
textures[i].fProxyView = {std::move(proxy), origin, swizzle};
- textures[i].fSrcAlphaType = image->alphaType();
+ textures[i].fSrcColorType = SkColorTypeToGrColorType(image->colorType());
textures[i].fSrcRect = set[i].fSrcRect;
textures[i].fDstRect = set[i].fDstRect;
textures[i].fDstClipQuad = clip;