Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit c7112ed

Browse files
bsalomonSkia Commit-Bot
authored andcommitted
Fix swizzles in clear_swizzle GM
Original version swizzled the alpha value. This isn't really allowed because of blend equations that use alpha coeffs. When doing color+alpha drawing we have to use the format's alpha channel as alpha in the swizzle. TBR: michaelludwig@google.com Bug: skia:11019 Change-Id: I38922b966d37974b250904ad5c0ea825728b8c77 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340340 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
1 parent 5334e89 commit c7112ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gm/clear_swizzle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ DEF_SIMPLE_GPU_GM(clear_swizzle, ctx, rtCtx, canvas, 6*kSize, 2*kSize) {
2121
}
2222

2323
auto make_offscreen = [&](const SkISize dimensions) {
24-
GrSwizzle readSwizzle = GrSwizzle::Concat(rtCtx->readSwizzle(), GrSwizzle{"garb"});
25-
GrSwizzle writeSwizzle = GrSwizzle::Concat(rtCtx->readSwizzle(), GrSwizzle{"brag"});
24+
GrSwizzle readSwizzle = GrSwizzle::Concat(rtCtx->readSwizzle(), GrSwizzle{"bgra"});
25+
GrSwizzle writeSwizzle = GrSwizzle::Concat(rtCtx->readSwizzle(), GrSwizzle{"bgra"});
2626
return GrRenderTargetContext::Make(ctx,
2727
rtCtx->colorInfo().refColorSpace(),
2828
SkBackingFit::kExact,

0 commit comments

Comments
 (0)