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

Commit 306b0fe

Browse files
authored
Add rects to accumulator rather than bounds (#37435)
When the accumulator is an `RTreeBoundsAccumulator` rather than a `RectBoundsAccumulator` just accumulating the bounds results in incorrect results as the `rtree` would need to be aware of the constituent non-overlapping rectangles. This would work fine for `RectBoundsAccumulator` as it would just adjust its bounds based on the passed rects. Fixes: flutter/flutter#113251
1 parent c24ae18 commit 306b0fe

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

display_list/display_list_utils.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,12 @@ void DisplayListBoundsCalculator::drawPicture(const sk_sp<SkPicture> picture,
672672
}
673673
void DisplayListBoundsCalculator::drawDisplayList(
674674
const sk_sp<DisplayList> display_list) {
675-
AccumulateOpBounds(display_list->bounds(), kDrawDisplayListFlags);
675+
const SkRect bounds = display_list->bounds();
676+
std::list<SkRect> rects =
677+
display_list->rtree()->searchNonOverlappingDrawnRects(bounds);
678+
for (const SkRect& rect : rects) {
679+
AccumulateOpBounds(rect, kDrawDisplayListFlags);
680+
}
676681
}
677682
void DisplayListBoundsCalculator::drawTextBlob(const sk_sp<SkTextBlob> blob,
678683
SkScalar x,

testing/scenario_app/run_ios_tests.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@ echo "Running simulator tests with Impeller"
5252
echo ""
5353

5454
# Skip testFontRenderingWhenSuppliedWithBogusFont: https://github.com/flutter/flutter/issues/113250
55-
# Skip testOneOverlayAndTwoIntersectingOverlays: https://github.com/flutter/flutter/issues/113251
5655
set -o pipefail && xcodebuild -sdk iphonesimulator \
5756
-scheme Scenarios \
5857
-destination 'platform=iOS Simulator,OS=13.0,name=iPhone 8' \
5958
clean test \
6059
FLUTTER_ENGINE="$FLUTTER_ENGINE" \
6160
-skip-testing "ScenariosUITests/BogusFontTextTest/testFontRenderingWhenSuppliedWithBogusFont" \
62-
-skip-testing "ScenariosUITests/UnobstructedPlatformViewTests/testOneOverlayAndTwoIntersectingOverlays" \
6361
INFOPLIST_FILE="Scenarios/Info_Impeller.plist" # Plist with FLTEnableImpeller=YES

0 commit comments

Comments
 (0)