Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: cc/output/direct_renderer.cc

Issue 2829543003: gpu: Empty swaps for surfaceless output surfaces. (Closed)
Patch Set: new workaround Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/direct_renderer.cc
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index 31f0d7ace0e13e7589142f1da6769fdddaef70f2..523f3c6dc248fe52cea5981b56e9f588f52518e9 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -98,6 +98,10 @@ void DirectRenderer::Initialize() {
allow_empty_swap_ = true;
if (context_provider->ContextCapabilities().dc_layers)
supports_dc_layers_ = true;
+ if (context_provider->ContextCapabilities()
+ .disable_non_empty_post_sub_buffers) {
+ use_partial_swap_ = false;
+ }
}
initialized_ = true;
@@ -346,19 +350,8 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
if (!skip_drawing_root_render_pass && !use_partial_swap_)
current_frame()->root_damage_rect = root_render_pass->output_rect;
- if (skip_drawing_root_render_pass) {
- // If any of the overlays is the output surface, then ensure that the
- // backbuffer be allocated (allocation of the backbuffer is a side-effect
- // of BindFramebufferToOutputSurface).
- for (auto& overlay : current_frame()->overlay_list) {
- if (overlay.use_output_surface_for_resource) {
- BindFramebufferToOutputSurface();
- break;
- }
- }
- } else {
+ if (!skip_drawing_root_render_pass)
DrawRenderPassAndExecuteCopyRequests(root_render_pass);
- }
FinishDrawingFrame();
render_passes_in_draw_order->clear();
« no previous file with comments | « no previous file | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698