-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reland "[Windows] Move to FlutterCompositor for rendering" #49726
Conversation
934fa88
to
0b7d8b8
Compare
gl_->Disable(GL_SCISSOR_TEST); | ||
gl_->Disable(GL_DEPTH_TEST); | ||
gl_->Disable(GL_STENCIL_TEST); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new: disable the scissor test
EDIT: Updated after addressing feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to worry about the depth/stencil state here. Just the scissor. The 4.6 spec says:
When values are written to the draw buffers, blit operations bypass most of the
fragment pipeline. The only fragment operations which affect a blit are the pixel
ownership test, the scissor test, and sRGB conversion (see section 17.3.7). Color,
depth, and stencil masks (see section 17.4.2) are ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you're right: the fix still works if we disable only the scissor test. Updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that it should block this change, but does Impeller still work with this configuration?
096c847
to
fb075db
Compare
@jonahwilliams It does not. Impeller invokes |
Thanks for checking! Can you file a bug for us with some information on what we need to update to make it work again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -48,7 +48,7 @@ static std::optional<GLuint> ConfigureFBO( | |||
} | |||
|
|||
if (gl.CheckFramebufferStatus(fbo_type) != GL_FRAMEBUFFER_COMPLETE) { | |||
VALIDATION_LOG << "Could not create a complete frambuffer."; | |||
VALIDATION_LOG << "Could not create a complete framebuffer."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frambuffer: most, but not quite all, of a framebuffer. 🤣
Would this break Windows 7 compatibility, or is this being used only if Win8+? |
@azchohfi For now we still fully support Windows 7. This PR doesn't use DirectComposition - is that your concern? |
@jonahwilliams Sure! Opened: flutter/flutter#141482. |
I completely misread the PR, ignore my comment. My bad. |
ff7d3b2
to
7c8da79
Compare
This reverts commit e95e123.
7c8da79
to
e866af0
Compare
…141651) flutter/engine@d4b6b7e...021a5ff 2024-01-16 ditman@gmail.com [web] Leave blob URLs untouched in TT policy. (flutter/engine#49782) 2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Fix a race between SwapchainImplVK::Present and WaitForFence (flutter/engine#49777) 2024-01-16 737941+loic-sharma@users.noreply.github.com Reland "[Windows] Move to FlutterCompositor for rendering" (flutter/engine#49726) 2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Add an API for sampling strictly within the bounds of the source rect in DrawImageRect (flutter/engine#49696) 2024-01-16 jonahwilliams@google.com [Impeller] Encode directly to command buffer for Vulkan. (flutter/engine#49780) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. 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
…isions)" (#141659) Reverts #141651 Initiated by: jonahwilliams This change reverts the following previous change: Original Description: flutter/engine@d4b6b7e...021a5ff 2024-01-16 ditman@gmail.com [web] Leave blob URLs untouched in TT policy. (flutter/engine#49782) 2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Fix a race between SwapchainImplVK::Present and WaitForFence (flutter/engine#49777) 2024-01-16 737941+loic-sharma@users.noreply.github.com Reland "[Windows] Move to FlutterCompositor for rendering" (flutter/engine#49726) 2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Add an API for sampling strictly within the bounds of the source rect in DrawImageRect (flutter/engine#49696) 2024-01-16 jonahwilliams@google.com [Impeller] Encode directly to command buffer for Vulkan. (flutter/engine#49780) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. 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
…141664) flutter/engine@d4b6b7e...1382ff7 2024-01-16 magder@google.com Remove iOS 12 availability checks (flutter/engine#49771) 2024-01-16 30870216+gaaclarke@users.noreply.github.com [Impeller] generate mipmaps for imagefilters (flutter/engine#49794) 2024-01-16 ditman@gmail.com [web] Leave blob URLs untouched in TT policy. (flutter/engine#49782) 2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Fix a race between SwapchainImplVK::Present and WaitForFence (flutter/engine#49777) 2024-01-16 737941+loic-sharma@users.noreply.github.com Reland "[Windows] Move to FlutterCompositor for rendering" (flutter/engine#49726) 2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Add an API for sampling strictly within the bounds of the source rect in DrawImageRect (flutter/engine#49696) 2024-01-16 jonahwilliams@google.com [Impeller] Encode directly to command buffer for Vulkan. (flutter/engine#49780) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. 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
Just to be clear, this change introduced an extra blit that's always there? What exactly is the reason for it? Why not use the back framebuffer? |
@knopp and I talked on Discord, but I'll capture our conversation here as well in case other folks have the same question. Currently the engine's backing stores are interchangeable if they have the same size. The intermediary textures plus extra blit allow us to render to multiple views while keeping this interchangeable model, with the trade-off of higher memory usage. We plan to have a conversation with the engine team to see if we can "tie" backing stores to a view. We expect this would require some minor embedder API changes. See: http://flutter.dev/go/backing-stores-for-multi-view-partial-repaint |
Original pull request description
This migrates the Windows embedder to
FlutterCompositor
so that the engine renders off-screen to a framebuffer instead of directly onto the window's surface. This will allow us to support platform views and multiple views on Windows.Addresses flutter/flutter#128904
Reland (again)
#49262 was reverted as it regressed
package:material_floating_search_bar_2
. See: flutter/flutter#140828This pull request is split into the following commits:
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.