Skip to content

Move compositor frame ownership into the view renderers#1

Closed
robert-ancell wants to merge 7 commits into
linux-split-view-rendererfrom
linux-subsurface-pre-refactor
Closed

Move compositor frame ownership into the view renderers#1
robert-ancell wants to merge 7 commits into
linux-split-view-rendererfrom
linux-subsurface-pre-refactor

Conversation

@robert-ancell

Copy link
Copy Markdown
Owner

Make FlCompositorSoftware and FlCompositorOpenGL stateless so they only composite layers into a caller-provided target. The view renderers now own the Cairo surface / OpenGL framebuffer and CPU pixel buffers, size them, and read frames back as required.

Add FlOpenGLFrame to encapsulate the OpenGL framebuffer and CPU pixel copy managed by the OpenGL renderer, and move the shared window-resize logic into a common fl_view_renderer_resize_to_frame method on FlViewRenderer. Drop the now unused return value from fl_compositor_opengl_composite_layers. Update the tests and compositor class descriptions to match.

flutter-pub-roller-bot and others added 7 commits July 8, 2026 20:35
This PR was generated by `flutter update-packages --force-upgrade`.
…support out of tree LinuxWindowingOwners (flutter#188917)

## Problem
While authoring https://github.com/mattkae/layer_shell.dart, I realized
that the Linux Windowing platform had a few major problems when it came
to extending it for out-of-tree windowing owners:

1. 3rd party windows could _not_ register in the `_windows` or `_views`
maps, which meant that they could never be parents. This is invalid, as
other windows (e.g. layer shell windows) may indeed want to be valid
parents and open popups. For example, a top panel may want to open a
sound control dropdown.
2. I wanted to extend `RegularWindowLinux`, but that was unfortunately
not possible because the regular windows realize themselves by the time
the constructor returns. Gtk layer shell windows require that the window
become layer shell _before_ it is realized. We could have added an odd
flag to the regular window, but that felt like duct-tape over a larger
issue whereby an external author could NOT do anything sufficiently
complex with the current API.

## What's new?
- Created a `GtkWindowRegistrar` that can be used to register and
unregister 3rd party windows

Associated PR: mattkae/layer_shell.dart#1

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
…9150)

https://skia.googlesource.com/skia.git/+log/8df24be66531..dd572c07f63c

2026-07-08 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
vulkan-deps from bbc872ec2e93 to 8ef965cdf8d0 (12 revisions)
2026-07-08
recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com
Roll recipe dependencies (trivial).
2026-07-08 alexisdavidc@google.com [Maintenance] Made the SkData object
within URLDataManager const
2026-07-08
recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com
Roll recipe dependencies (trivial).

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC bensonluk@google.com,egdaniel@google.com,kjlubick@google.com
on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…9081)

Promotes the `android_hardware_smoke_test` builders from bringup to
active presubmit targets.

Part of flutter#182123

I'm not planning to add more new goldens to these for now, and they're
pretty stable over the last 100 staging runs:
* **`Linux_android_emu android_hardware_smoke_opengles_tests`**: 100%
success rate (0 failures / 0 infra failures)
* **`Linux_android_emu_vulkan_stable
android_hardware_smoke_vulkan_tests`**: 99% success rate (1 failure / 0
infra failures). Filed flutter#189079
to address the failure, but that feels non-blocking to me for this PR.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
The [original issue](flutter#173971)
(whose fix caused this regression) is still avoided since the
`_vmService` getter is always guarded by `isRunningDebug` or
`supportsServiceProtocol`, which are false for wasm builds.

Fixes flutter#186445

Kudos to https://github.com/codebk1 for finding the fix!
Make FlCompositorSoftware and FlCompositorOpenGL stateless so they only
composite layers into a caller-provided target. The view renderers now
own the Cairo surface / OpenGL framebuffer and CPU pixel buffers, size
them, and read frames back as required.

Add FlOpenGLFrame to encapsulate the OpenGL framebuffer and CPU pixel
copy managed by the OpenGL renderer, and move the shared window-resize
logic into a common fl_view_renderer_resize_to_frame method on
FlViewRenderer. Drop the now unused return value from
fl_compositor_opengl_composite_layers. Update the tests and compositor
class descriptions to match.
@robert-ancell robert-ancell force-pushed the linux-subsurface-pre-refactor branch from 1a6ca0b to 1975c0f Compare July 9, 2026 01:22
@robert-ancell

Copy link
Copy Markdown
Owner Author

Redone as flutter#189162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants