Index: cc/output/direct_renderer.cc |
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc |
index e9b62d29587bfdec92dd74dbb2f73f9aac87266f..78c34c84d10317fb6a65a1946fac09416c5989c6 100644 |
--- a/cc/output/direct_renderer.cc |
+++ b/cc/output/direct_renderer.cc |
@@ -337,15 +337,14 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, |
current_frame()->root_render_pass->output_rect; |
} |
+ allow_partial_draw_ = |
+ use_partial_swap_ || |
+ output_surface_->CanPartialDraw(current_frame()->root_damage_rect); |
+ |
// We can skip all drawing if the damage rect is now empty. |
bool skip_drawing_root_render_pass = |
current_frame()->root_damage_rect.IsEmpty() && allow_empty_swap_; |
- // 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_) |
- 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 |
@@ -532,7 +531,7 @@ void DirectRenderer::DrawRenderPass(const RenderPass* render_pass) { |
DeviceViewportRectInDrawSpace()); |
} |
- if (use_partial_swap_) { |
+ if (allow_partial_draw_) { |
render_pass_scissor_in_draw_space.Intersect( |
current_frame()->ComputeScissorRectForRenderPass()); |
} |