From bb255dd0252e256a28542475b22711346c319030 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Fri, 16 May 2025 01:08:27 +0000 Subject: [PATCH] Fix shift of the blue component in store_1010102_xr Bug: https://github.com/flutter/flutter/issues/168849 Change-Id: I43c21535fbea6749f644301e162aacb2bbd5f5c3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/994956 Reviewed-by: Michael Ludwig Commit-Queue: Jason Simmons diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h index fb644ba5e3..3784ccbde5 100644 --- a/src/opts/SkRasterPipeline_opts.h +++ b/src/opts/SkRasterPipeline_opts.h @@ -3137,7 +3137,7 @@ HIGHP_STAGE(store_1010102_xr, const SkRasterPipelineContexts::MemoryCtx* ctx) { // This is the inverse of from_1010102_xr, e.g. (v * 510 + 384) U32 px = to_unorm(r, /*scale=*/510, /*bias=*/384, /*maxI=*/1023) | to_unorm(g, /*scale=*/510, /*bias=*/384, /*maxI=*/1023) << 10 - | to_unorm(b, /*scale=*/510, /*bias=*/384, /*maxI=*/1023) << 10 + | to_unorm(b, /*scale=*/510, /*bias=*/384, /*maxI=*/1023) << 20 | to_unorm(a, /*scale=*/3) << 30; store(ptr, px); }