Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ void AndroidExternalViewEmbedder::SubmitFrame(
//
// In this case, the rects are merged into a single one that is the union
// of all the rects.
for (const SkRect& rect : intersection_rects) {
for (SkRect rect : intersection_rects) {
rect.intersect(current_view_rect);
joined_rect.join(rect);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ TEST(AndroidExternalViewEmbedder, SubmitFrame) {
0, 150, 150, 300, 300, 300, 300, stack1));
// The JNI call to display the overlay surface.
EXPECT_CALL(*jni_mock,
FlutterViewDisplayOverlaySurface(0, 50, 50, 200, 200));
FlutterViewDisplayOverlaySurface(0, 150, 150, 100, 100));

auto did_submit_frame = false;
auto surface_frame = std::make_unique<SurfaceFrame>(
Expand Down Expand Up @@ -491,7 +491,7 @@ TEST(AndroidExternalViewEmbedder, SubmitFrame) {
0, 150, 150, 300, 300, 300, 300, stack1));
// The JNI call to display the overlay surface.
EXPECT_CALL(*jni_mock,
FlutterViewDisplayOverlaySurface(0, 50, 50, 200, 200));
FlutterViewDisplayOverlaySurface(0, 150, 150, 100, 100));

auto did_submit_frame = false;
auto surface_frame = std::make_unique<SurfaceFrame>(
Expand Down Expand Up @@ -776,7 +776,7 @@ TEST(AndroidExternalViewEmbedder, DestroyOverlayLayersOnSizeChange) {
EXPECT_CALL(*jni_mock, FlutterViewOnDisplayPlatformView(0, 0, 0, 200, 200,
300, 300, stack1));
EXPECT_CALL(*jni_mock,
FlutterViewDisplayOverlaySurface(0, 50, 50, 200, 200));
FlutterViewDisplayOverlaySurface(0, 50, 50, 150, 150));

SurfaceFrame::FramebufferInfo framebuffer_info;
auto surface_frame = std::make_unique<SurfaceFrame>(
Expand Down Expand Up @@ -865,7 +865,7 @@ TEST(AndroidExternalViewEmbedder, DoesNotDestroyOverlayLayersOnSizeChange) {
EXPECT_CALL(*jni_mock, FlutterViewOnDisplayPlatformView(0, 0, 0, 200, 200,
300, 300, stack1));
EXPECT_CALL(*jni_mock,
FlutterViewDisplayOverlaySurface(0, 50, 50, 200, 200));
FlutterViewDisplayOverlaySurface(0, 50, 50, 150, 150));

auto surface_frame = std::make_unique<SurfaceFrame>(
SkSurface::MakeNull(1000, 1000), framebuffer_info,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,8 @@ static bool ClipBoundsContainsPlatformViewBoundingRect(const SkRect& clip_bounds
// https://github.com/flutter/flutter/issues/52510
if (allocation_size > kMaxLayerAllocations) {
SkRect joined_rect;
for (const SkRect& rect : intersection_rects) {
for (SkRect rect : intersection_rects) {
rect.intersect(platform_view_rect);
joined_rect.join(rect);
}
// Replace the rects in the intersection rects list for a single rect that is
Expand Down