From ecd324b267a6918c53a8ecccccd84bea3ffbd807 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Fri, 18 Oct 2024 16:35:29 -0700 Subject: [PATCH 1/2] fix scene builder rect construction in shader mask. --- lib/ui/compositing/scene_builder.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/compositing/scene_builder.cc b/lib/ui/compositing/scene_builder.cc index a8e3a29f85435..7d58c4fb04b90 100644 --- a/lib/ui/compositing/scene_builder.cc +++ b/lib/ui/compositing/scene_builder.cc @@ -190,13 +190,13 @@ void SceneBuilder::pushShaderMask(Dart_Handle layer_handle, double mask_rect_left, double mask_rect_right, double mask_rect_top, - double mask_Rect_bottom, + double mask_rect_bottom, int blend_mode, int filter_quality_index, const fml::RefPtr& old_layer) { SkRect rect = - SkRect::MakeLTRB(SafeNarrow(mask_rect_right), SafeNarrow(mask_rect_right), - SafeNarrow(mask_rect_top), SafeNarrow(mask_Rect_bottom)); + SkRect::MakeLTRB(SafeNarrow(mask_rect_left), SafeNarrow(mask_rect_top), + SafeNarrow(mask_rect_right), SafeNarrow(mask_rect_bottom)); auto sampling = ImageFilter::SamplingFromIndex(filter_quality_index); auto layer = std::make_shared( shader->shader(sampling), rect, static_cast(blend_mode)); From 87b945c015240c851b335564b01a0a62fabafcaf Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Fri, 18 Oct 2024 16:36:12 -0700 Subject: [PATCH 2/2] ++ --- lib/ui/compositing/scene_builder.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/compositing/scene_builder.cc b/lib/ui/compositing/scene_builder.cc index 7d58c4fb04b90..4c2659ffa1efe 100644 --- a/lib/ui/compositing/scene_builder.cc +++ b/lib/ui/compositing/scene_builder.cc @@ -194,9 +194,9 @@ void SceneBuilder::pushShaderMask(Dart_Handle layer_handle, int blend_mode, int filter_quality_index, const fml::RefPtr& old_layer) { - SkRect rect = - SkRect::MakeLTRB(SafeNarrow(mask_rect_left), SafeNarrow(mask_rect_top), - SafeNarrow(mask_rect_right), SafeNarrow(mask_rect_bottom)); + SkRect rect = SkRect::MakeLTRB( + SafeNarrow(mask_rect_left), SafeNarrow(mask_rect_top), + SafeNarrow(mask_rect_right), SafeNarrow(mask_rect_bottom)); auto sampling = ImageFilter::SamplingFromIndex(filter_quality_index); auto layer = std::make_shared( shader->shader(sampling), rect, static_cast(blend_mode));