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

Commit 2f86215

Browse files
author
auto-submit[bot]
committed
Revert "Hooks up framework wide gamut to engine wide gamut (#54567)"
This reverts commit e3a15e1.
1 parent da87db6 commit 2f86215

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

impeller/display_list/aiks_dl_vertices_unittests.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "flutter/display_list/dl_color.h"
1313
#include "flutter/display_list/dl_paint.h"
1414
#include "flutter/testing/testing.h"
15-
#include "impeller/display_list/dl_dispatcher.h"
1615
#include "impeller/display_list/dl_image_impeller.h"
1716

1817
namespace impeller {
@@ -376,10 +375,7 @@ TEST_P(AiksTest, DrawVerticesWithInvalidIndices) {
376375
builder.DrawRect(SkRect::MakeLTRB(0, 0, 400, 400), paint);
377376
builder.DrawVertices(vertices, flutter::DlBlendMode::kSrc, paint);
378377

379-
AiksContext renderer(GetContext(), nullptr);
380-
std::shared_ptr<Texture> image =
381-
DisplayListToTexture(builder.Build(), {1024, 768}, renderer);
382-
EXPECT_TRUE(image);
378+
ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
383379
}
384380

385381
// All four vertices should form a solid red rectangle with no gaps.

lib/ui/painting/paint.cc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@ 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-
75-
DlColor dl_color(alpha, red, green, blue,
76-
static_cast<DlColorSpace>(colorspace));
77-
78-
return dl_color.withColorSpace(DlColorSpace::kExtendedSRGB);
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);
7982
}
8083
} // namespace
8184

testing/impeller_golden_tests_output.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,9 @@ impeller_Play_AiksTest_DrawVerticesTextureCoordinatesWithFragmentShaderNonZeroOr
614614
impeller_Play_AiksTest_DrawVerticesTextureCoordinatesWithFragmentShader_Metal.png
615615
impeller_Play_AiksTest_DrawVerticesTextureCoordinatesWithFragmentShader_OpenGLES.png
616616
impeller_Play_AiksTest_DrawVerticesTextureCoordinatesWithFragmentShader_Vulkan.png
617+
impeller_Play_AiksTest_DrawVerticesWithInvalidIndices_Metal.png
618+
impeller_Play_AiksTest_DrawVerticesWithInvalidIndices_OpenGLES.png
619+
impeller_Play_AiksTest_DrawVerticesWithInvalidIndices_Vulkan.png
617620
impeller_Play_AiksTest_EmptySaveLayerIgnoresPaint_Metal.png
618621
impeller_Play_AiksTest_EmptySaveLayerIgnoresPaint_OpenGLES.png
619622
impeller_Play_AiksTest_EmptySaveLayerIgnoresPaint_Vulkan.png

0 commit comments

Comments
 (0)