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

Commit b2132f9

Browse files
committed
Hooks up framework wide gamut color to the engine.
1 parent 4771d83 commit b2132f9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/ui/painting/paint.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,8 @@ DlColor ReadColor(const tonic::DartByteData& byte_data) {
7171
// Invert alpha so 0 initialized buffer has default value;
7272
float alpha = 1.f - float_data[kColorAlphaIndex];
7373
uint32_t colorspace = uint_data[kColorSpaceIndex];
74-
(void)colorspace;
75-
uint32_t encoded_color =
76-
static_cast<uint8_t>(std::round(alpha * 255.f)) << 24 | //
77-
static_cast<uint8_t>(std::round(red * 255.f)) << 16 | //
78-
static_cast<uint8_t>(std::round(green * 255.f)) << 8 | //
79-
static_cast<uint8_t>(std::round(blue * 255.f)) << 0;
80-
// TODO(gaaclarke): Pass down color info to DlColor.
81-
return DlColor(encoded_color);
74+
return DlColor(alpha, red, green, blue,
75+
static_cast<DlColorSpace>(colorspace));
8276
}
8377
} // namespace
8478

0 commit comments

Comments
 (0)