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

Commit 6679696

Browse files
author
jonahwilliams
committed
++
1 parent 8e43803 commit 6679696

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

impeller/aiks/aiks_unittests.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <utility>
1313
#include <vector>
1414

15-
#include "display_list/dl_paint.h"
1615
#include "flutter/testing/testing.h"
1716
#include "gtest/gtest.h"
1817
#include "impeller/aiks/canvas.h"
@@ -667,7 +666,6 @@ bool RenderTextInCanvasSkia(const std::shared_ptr<Context>& context,
667666
}
668667

669668
// Create the Impeller text frame and draw it at the designated baseline.
670-
flutter::DlPaint paint;
671669
auto frame = MakeTextFrameFromTextBlobSkia(blob);
672670

673671
Paint text_paint;
@@ -908,7 +906,6 @@ TEST_P(AiksTest, CanRenderTextOutsideBoundaries) {
908906
{
909907
auto blob = SkTextBlob::MakeFromString(t.text, sk_font);
910908
ASSERT_NE(blob, nullptr);
911-
flutter::DlPaint paint;
912909
auto frame = MakeTextFrameFromTextBlobSkia(blob);
913910
canvas.DrawTextFrame(frame, Point(), text_paint);
914911
}

impeller/entity/contents/text_contents.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ void TextContents::SetTextProperties(Color color,
7777
Join stroke_join,
7878
Scalar stroke_miter) {
7979
if (frame_->HasColor()) {
80-
properties_.color = color;
80+
// Alpha is always applied when rendering, remove it here so
81+
// we do not double-apply the alpha.
82+
properties_.color = color.WithAlpha(1.0);
8183
}
8284
if (stroke) {
8385
properties_.stroke = true;

0 commit comments

Comments
 (0)