Fix unitialized SkRect (flutter/engine#42403)
Empty SkRect needs to be created with `SkRect::MakeEmpty()` otherwise the default value is undefined (and possibly garbage). *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
@@ -703,7 +703,7 @@ bool FlutterPlatformViewsController::SubmitFrame(GrDirectContext* gr_context,
|
||||
// TODO(egarciad): Consider making this configurable.
|
||||
// https://github.com/flutter/flutter/issues/52510
|
||||
if (allocation_size > kMaxLayerAllocations) {
|
||||
SkRect joined_rect;
|
||||
SkRect joined_rect = SkRect::MakeEmpty();
|
||||
for (const SkRect& rect : intersection_rects) {
|
||||
joined_rect.join(rect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user