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

Commit 49571ab

Browse files
committed
Add missing SkRect initialization
1 parent 65f663e commit 49571ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

flow/layers/physical_shape_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void PhysicalShapeLayer::Preroll(PrerollContext* context,
5656
Layer::AutoPrerollSaveLayerState save =
5757
Layer::AutoPrerollSaveLayerState::Create(context, UsesSaveLayer());
5858

59-
SkRect child_paint_bounds;
59+
SkRect child_paint_bounds = SkRect::MakeEmpty();
6060
PrerollChildren(context, matrix, &child_paint_bounds);
6161

6262
SkRect paint_bounds;

flow/layers/physical_shape_layer_unittests.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ TEST_F(PhysicalShapeLayerTest, ChildrenLargerThanPathClip) {
8787
layer->Add(child1);
8888
layer->Add(child2);
8989

90-
SkRect child_paint_bounds;
90+
SkRect child_paint_bounds = SkRect::MakeEmpty();
9191
layer->Preroll(preroll_context(), SkMatrix());
9292
child_paint_bounds.join(child1->paint_bounds());
9393
child_paint_bounds.join(child2->paint_bounds());
@@ -142,7 +142,7 @@ TEST_F(PhysicalShapeLayerTest, ChildrenLargerThanPathNoClip) {
142142
layer->Add(child1);
143143
layer->Add(child2);
144144

145-
SkRect total_bounds;
145+
SkRect total_bounds = SkRect::MakeEmpty();
146146
layer->Preroll(preroll_context(), SkMatrix());
147147
total_bounds.join(child1->paint_bounds());
148148
total_bounds.join(child2->paint_bounds());

0 commit comments

Comments
 (0)