[Linux] Move Flutter rendering into a new FlViewRenderer widget#188289
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. 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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request refactors the Linux platform shell by introducing a new FlViewRenderer widget to encapsulate the rendering logic previously handled directly by FlView. The review feedback identifies several potential null pointer dereferences in fl_view_renderer.cc where self->compositor or color could be null, which could lead to crashes during redraw, drawing, layer presentation, or background color updates.
Extracts the GtkDrawingArea and all Flutter rendering responsibilities out of FlView into a new FlViewRenderer widget. FlViewRenderer owns the compositor, OpenGL context and background color, and performs the frame drawing. FlView retains input handling, accessibility, geometry and engine lifecycle, delegating rendering to the new widget.
4143b60 to
8027cce
Compare
|
Rebased and force-pushed to avoid confusing the cla checker. |
…ter#188289) Extracts the GtkDrawingArea and all Flutter rendering responsibilities out of FlView into a new FlViewRenderer widget. FlViewRenderer owns the compositor, OpenGL context and background color, and performs the frame drawing. FlView retains input handling, accessibility, geometry and engine lifecycle, delegating rendering to the new widget. This reduces the complexity of FlView, but is mostly motivated by wanting to add a subsurface renderer, which will either add functionality to FlViewRenderer or we will have multiple renderer widgets.
Extracts the GtkDrawingArea and all Flutter rendering responsibilities out of FlView into a new FlViewRenderer widget. FlViewRenderer owns the compositor, OpenGL context and background color, and performs the frame drawing. FlView retains input handling, accessibility, geometry and engine lifecycle, delegating rendering to the new widget.
This reduces the complexity of FlView, but is mostly motivated by wanting to add a subsurface renderer, which will either add functionality to FlViewRenderer or we will have multiple renderer widgets.