Index: cc/output/direct_renderer.cc |
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc |
index 31f0d7ace0e13e7589142f1da6769fdddaef70f2..5edef5c8295ea4029d8dcc3109eb082fdddd1cfe 100644 |
--- a/cc/output/direct_renderer.cc |
+++ b/cc/output/direct_renderer.cc |
@@ -93,11 +93,16 @@ void DirectRenderer::Initialize() { |
use_partial_swap_ = settings_->partial_swap_enabled && CanPartialSwap(); |
allow_empty_swap_ = use_partial_swap_; |
+ allow_partial_swap_ = use_partial_swap_; |
if (context_provider) { |
if (context_provider->ContextCapabilities().commit_overlay_planes) |
allow_empty_swap_ = true; |
if (context_provider->ContextCapabilities().dc_layers) |
supports_dc_layers_ = true; |
+ if (context_provider->ContextCapabilities() |
+ .disable_non_empty_post_sub_buffers) { |
+ allow_partial_swap_ = false; |
jbauman
2017/04/20 21:30:06
If you just set use_partial_swap_=false here, then
reveman
2017/04/20 22:11:40
Good idea. Done.
|
+ } |
} |
initialized_ = true; |
@@ -343,22 +348,11 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, |
// If we have to draw but don't support partial swap, the whole output should |
// be considered damaged. |
- if (!skip_drawing_root_render_pass && !use_partial_swap_) |
+ if (!skip_drawing_root_render_pass && !allow_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) |
Daniele Castagna
2017/04/19 19:10:36
In the comment you removed it mentioned that calli
reveman
2017/04/19 23:59:03
Yes, that was kind of a hack. Before this we still
|
DrawRenderPassAndExecuteCopyRequests(root_render_pass); |
- } |
FinishDrawingFrame(); |
render_passes_in_draw_order->clear(); |