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

Reduce the size of Overlay FlutterImageView in HC mode - #38393

Merged
auto-submit[bot] merged 13 commits into
flutter-team-archive:mainfrom
Nayuta403:overlay
Jan 5, 2023
Merged

auto-submit[bot] merged 13 commits into
flutter-team-archive:mainfrom
Nayuta403:overlay

Conversation

@Nayuta403

@Nayuta403 Nayuta403 commented Dec 19, 2022 •

Copy link
Copy Markdown
Contributor

fix: flutter/flutter#117303

In HC mode, for the intersecting layers on top of the Platformview, we create an OverlayImageView display as shown below
image
But the current size of the Overlay is the size of the Layer, the rectangle where the Layer intersects the Platformview can be calculated to reduce the size of the Overlay. As shown below

image

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@zanderso
zanderso requested review from cyanglaz and flar December 19, 2022 16:38
@Nayuta403

Copy link
Copy Markdown
Contributor Author

@cyanglaz @flar Thanks for the response, you're right.
Sorry, I didn't notice this on ios, but I just noticed it on Android and changed it synchronically. joined_rect.intersect(platform_view_rect) it's a very good deal, I'll do it later.

@Hixie

Hixie commented Dec 20, 2022

Copy link
Copy Markdown
Contributor

test-exempt: is tested (for some reason the script didn't detect that?)

@flar flar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@flar
flar requested a review from cyanglaz December 20, 2022 09:49
@jmagman

jmagman commented Dec 21, 2022

Copy link
Copy Markdown
Contributor

@cyanglaz can you re-review?

@Nayuta403

Copy link
Copy Markdown
Contributor Author

@flar Okay, I added tests
image
There is something wrong with ci, let me confirm

@Nayuta403

This comment was marked as off-topic.

@cyanglaz

cyanglaz commented Dec 22, 2022 •

Copy link
Copy Markdown
Contributor

android_external_view_embedder_unittests --repeat=2 this is the failing test command.

You need to run: out/<your_host_build_dir>/android_external_view_embedder_unittests

@Nayuta403

This comment was marked as off-topic.

@cyanglaz

Copy link
Copy Markdown
Contributor

You should find android_external_view_embedder_unittests under out/host_debug_unopt

@Nayuta403

Copy link
Copy Markdown
Contributor Author

@cyanglaz Thanks, I finally found it, the tests have been added again, welcome to review

@auto-submit
auto-submit Bot merged commit 74861f3 into flutter-team-archive:main Jan 5, 2023
sourcegraph-bot pushed a commit to sgtest/megarepo that referenced this pull request Jan 5, 2023
…mode (flutter-team-archive/engine#38393) (#118048)

Commit: 36a1caf299237330a70e6493df339c95b6682204
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jan 6, 2023
* 7a5ae7c Roll Plugins from f9dda6a27b79 to 320461910156 (2 revisions) (flutter/flutter#118040)

* 43b9120 072a9ca37 Add `TextProvider` and `TextEdit` patterns to `AXPlatformNodeWin` (flutter-team-archive/engine#38646) (flutter/flutter#118039)

* 5a87a82 bb4015269 Roll Skia from 158d51b34caa to ecd3a2f865ba (1 revision) (flutter-team-archive/engine#38659) (flutter/flutter#118042)

* 0a2e0a4 Avoid using `TextAffinity` in `TextBoundary` (flutter/flutter#117446)

* 36a1caf 74861f369 Reduce the size of Overlay FlutterImageView in HC mode (flutter-team-archive/engine#38393) (flutter/flutter#118048)

* 9b864b8 5bd90d6e7 Consider more roles as text (flutter-team-archive/engine#38645) (flutter/flutter#118049)

* 70d5834 [EMPTY] Commit to refresh the tree that is currently red (flutter/flutter#118062)

* 4f3ed80 Remove doc reference to the deprecated ui.FlutterWindow API (flutter/flutter#118064)

* de2a424 Fix `flutter update-packages` regression by fixing parameters in "pub get" runner (flutter/flutter#116687)

* 57dc071 Adding 'is' to list of kotlin reserved keywords (flutter/flutter#116299)

* 5070620 Added expandIconColor property on ExpansionPanelList Widget (flutter/flutter#115950)
auto-submit Bot pushed a commit to flutter-team-archive/plugins that referenced this pull request Jan 6, 2023
* 5a87a82 bb4015269 Roll Skia from 158d51b34caa to ecd3a2f865ba (1 revision) (flutter-team-archive/engine#38659) (flutter/flutter#118042)

* 0a2e0a4 Avoid using `TextAffinity` in `TextBoundary` (flutter/flutter#117446)

* 36a1caf 74861f369 Reduce the size of Overlay FlutterImageView in HC mode (flutter-team-archive/engine#38393) (flutter/flutter#118048)

* 9b864b8 5bd90d6e7 Consider more roles as text (flutter-team-archive/engine#38645) (flutter/flutter#118049)

* 70d5834 [EMPTY] Commit to refresh the tree that is currently red (flutter/flutter#118062)

* 4f3ed80 Remove doc reference to the deprecated ui.FlutterWindow API (flutter/flutter#118064)

* de2a424 Fix `flutter update-packages` regression by fixing parameters in "pub get" runner (flutter/flutter#116687)

* 57dc071 Adding 'is' to list of kotlin reserved keywords (flutter/flutter#116299)

* 5070620 Added expandIconColor property on ExpansionPanelList Widget (flutter/flutter#115950)