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

Commit 804653a

Browse files
committed
minor streamlining of paragraph SkPaint construction
1 parent c2942d4 commit 804653a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/ui/text/paragraph_builder.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,18 +453,16 @@ void ParagraphBuilder::pushStyle(tonic::Int32List& encoded,
453453
if (mask & tsBackgroundMask) {
454454
Paint background(background_objects, background_data);
455455
if (background.isNotNull()) {
456-
SkPaint sk_paint;
457456
style.has_background = true;
458-
style.background = *background.paint(sk_paint);
457+
FML_CHECK(background.paint(style.background));
459458
}
460459
}
461460

462461
if (mask & tsForegroundMask) {
463462
Paint foreground(foreground_objects, foreground_data);
464463
if (foreground.isNotNull()) {
465-
SkPaint sk_paint;
466464
style.has_foreground = true;
467-
style.foreground = *foreground.paint(sk_paint);
465+
FML_CHECK(foreground.paint(style.foreground));
468466
}
469467
}
470468

0 commit comments

Comments
 (0)