-
Notifications
You must be signed in to change notification settings - Fork 6k
Do not override partial repaint support globally #35539
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,7 +196,6 @@ bool GPUSurfaceGLSkia::CreateOrUpdateSurfaces(const SkISize& size) { | |
|
|
||
| onscreen_surface_ = std::move(onscreen_surface); | ||
| fbo_id_ = fbo_info.fbo_id; | ||
| supports_partial_repaint_ = fbo_info.partial_repaint_enabled; | ||
| existing_damage_ = fbo_info.existing_damage; | ||
|
|
||
| return true; | ||
|
|
@@ -250,9 +249,9 @@ std::unique_ptr<SurfaceFrame> GPUSurfaceGLSkia::AcquireFrame( | |
| }; | ||
|
|
||
| framebuffer_info = delegate_->GLContextFramebufferInfo(); | ||
| // Partial repaint is enabled by default | ||
| framebuffer_info.supports_partial_repaint = supports_partial_repaint_; | ||
| framebuffer_info.existing_damage = existing_damage_; | ||
| if (!framebuffer_info.existing_damage.has_value()) { | ||
| framebuffer_info.existing_damage = existing_damage_; | ||
| } | ||
|
Comment on lines
+252
to
+254
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks good to me! It should work given that FBOResetAfterPresent is not always called and it should also work if FBO was indeed reset and the Embedder passed information about the existing damage. |
||
| return std::make_unique<SurfaceFrame>(surface, std::move(framebuffer_info), | ||
| submit_callback, | ||
| std::move(context_switch)); | ||
|
|
@@ -303,7 +302,6 @@ bool GPUSurfaceGLSkia::PresentSurface(const SurfaceFrame& frame, | |
|
|
||
| onscreen_surface_ = std::move(new_onscreen_surface); | ||
| fbo_id_ = fbo_info.fbo_id; | ||
| supports_partial_repaint_ = fbo_info.partial_repaint_enabled; | ||
| existing_damage_ = fbo_info.existing_damage; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,6 +167,8 @@ GLFBOInfo AndroidSurfaceGLSkia::GLContextFBO(GLFrameInfo frame_info) const { | |
| // The default window bound framebuffer on Android. | ||
| return GLFBOInfo{ | ||
| .fbo_id = 0, | ||
| .partial_repaint_enabled = onscreen_surface_->SupportsPartialRepaint(), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The version in place before #35022 landed was this https://github.com/flutter/engine/pull/35022/files#:~:text=framebuffer%20on%20Android.-,return%200%3B,-return%20GLFBOInfo%7B. It did not pass any sort of information besides the fbo_id, which makes me think that this might not be the problem yet. |
||
| .existing_damage = onscreen_surface_->InitialDamage(), | ||
| }; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.