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

Commit 8019b83

Browse files
author
jonahwilliams
committed
++
1 parent b091bfb commit 8019b83

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

display_list/dl_color.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ struct DlColor {
5757
static constexpr DlColor kSkyBlue() {return DlColor(0xFF87CEEB);};
5858
static constexpr DlColor kCornflowerBlue() {return DlColor(0xFF6495ED);};
5959
static constexpr DlColor kCrimson() {return DlColor(0xFFFF5733);};
60+
static constexpr DlColor kAqua() {return DlColor(0xFF00FFFF);};
6061
// clang-format on
6162

6263
constexpr bool isOpaque() const { return getAlpha() == 0xFF; }

impeller/display_list/aiks_dl_basic_unittests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ TEST_P(AiksTest, CoordinateConversionsAreCorrect) {
11221122
builder.Translate(100, 200);
11231123
builder.Scale(0.5, 0.5);
11241124
builder.DrawImage(image, SkPoint::Make(100.0, 100.0),
1125-
DlImageSampling::kLinear);
1125+
DlImageSampling::kNearestNeighbor);
11261126
builder.Restore();
11271127
}
11281128

impeller/display_list/aiks_dl_text_unittests.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ bool RenderTextInCanvasSkia(const std::shared_ptr<Context>& context,
4444
const TextRenderOptions& options = {}) {
4545
// Draw the baseline.
4646
DlPaint paint;
47-
paint.setColor(DlColor::kBlue().modulateOpacity(0.25));
47+
paint.setColor(DlColor::kAqua().modulateOpacity(0.25));
4848
canvas.DrawRect(SkRect::MakeXYWH(options.position.x() - 50,
4949
options.position.y(), 900, 10),
5050
paint);
@@ -87,7 +87,7 @@ bool RenderTextInCanvasSTB(const std::shared_ptr<Context>& context,
8787
const TextRenderOptions& options = {}) {
8888
// Draw the baseline.
8989
DlPaint paint;
90-
paint.setColor(DlColor::kBlue().modulateOpacity(0.25));
90+
paint.setColor(DlColor::kAqua().modulateOpacity(0.25));
9191
canvas.DrawRect(SkRect::MakeXYWH(options.position.x() - 50,
9292
options.position.y(), 900, 10),
9393
paint);
@@ -118,7 +118,7 @@ TEST_P(AiksTest, CanRenderTextFrame) {
118118
DisplayListBuilder builder;
119119

120120
DlPaint paint;
121-
paint.setColor(DlColor::ARGB(0.1, 0.1, 0.1, 0.1));
121+
paint.setColor(DlColor::ARGB(1, 0.1, 0.1, 0.1));
122122
builder.DrawPaint(paint);
123123
ASSERT_TRUE(RenderTextInCanvasSkia(
124124
GetContext(), builder, "the quick brown fox jumped over the lazy dog!.?",
@@ -131,7 +131,7 @@ TEST_P(AiksTest, CanRenderTextFrameWithInvertedTransform) {
131131
DisplayListBuilder builder;
132132

133133
DlPaint paint;
134-
paint.setColor(DlColor::ARGB(0.1, 0.1, 0.1, 0.1));
134+
paint.setColor(DlColor::ARGB(1, 0.1, 0.1, 0.1));
135135
builder.DrawPaint(paint);
136136
builder.Translate(1000, 0);
137137
builder.Scale(-1, 1);
@@ -147,7 +147,7 @@ TEST_P(AiksTest, CanRenderStrokedTextFrame) {
147147
DisplayListBuilder builder;
148148

149149
DlPaint paint;
150-
paint.setColor(DlColor::ARGB(0.1, 0.1, 0.1, 0.1));
150+
paint.setColor(DlColor::ARGB(1, 0.1, 0.1, 0.1));
151151
builder.DrawPaint(paint);
152152

153153
ASSERT_TRUE(RenderTextInCanvasSkia(
@@ -163,7 +163,7 @@ TEST_P(AiksTest, CanRenderTextFrameWithHalfScaling) {
163163
DisplayListBuilder builder;
164164

165165
DlPaint paint;
166-
paint.setColor(DlColor::ARGB(0.1, 0.1, 0.1, 0.1));
166+
paint.setColor(DlColor::ARGB(1, 0.1, 0.1, 0.1));
167167
builder.DrawPaint(paint);
168168
builder.Scale(0.5, 0.5);
169169

@@ -177,7 +177,7 @@ TEST_P(AiksTest, CanRenderTextFrameWithFractionScaling) {
177177
DisplayListBuilder builder;
178178

179179
DlPaint paint;
180-
paint.setColor(DlColor::ARGB(0.1, 0.1, 0.1, 0.1));
180+
paint.setColor(DlColor::ARGB(1, 0.1, 0.1, 0.1));
181181
builder.DrawPaint(paint);
182182
builder.Scale(2.625, 2.625);
183183

@@ -191,7 +191,7 @@ TEST_P(AiksTest, CanRenderTextFrameSTB) {
191191
DisplayListBuilder builder;
192192

193193
DlPaint paint;
194-
paint.setColor(DlColor::ARGB(0.1, 0.1, 0.1, 0.1));
194+
paint.setColor(DlColor::ARGB(1, 0.1, 0.1, 0.1));
195195
builder.DrawPaint(paint);
196196

197197
ASSERT_TRUE(RenderTextInCanvasSTB(

0 commit comments

Comments
 (0)