| Index: cc/output/direct_renderer.cc
|
| diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
|
| index 0a66eea2ae10bab6c2007d7e50fe60ea2c94d924..1b959cae13cf4b453d64053e19fbd7aef99f9d57 100644
|
| --- a/cc/output/direct_renderer.cc
|
| +++ b/cc/output/direct_renderer.cc
|
| @@ -198,7 +198,7 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
|
| "Renderer4.renderPassCount",
|
| base::saturated_cast<int>(render_passes_in_draw_order->size()));
|
|
|
| - const RenderPass* root_render_pass = render_passes_in_draw_order->back();
|
| + RenderPass* root_render_pass = render_passes_in_draw_order->back();
|
| DCHECK(root_render_pass);
|
|
|
| DrawingFrame frame;
|
| @@ -207,6 +207,8 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
|
| frame.root_damage_rect = Capabilities().using_partial_swap
|
| ? root_render_pass->damage_rect
|
| : root_render_pass->output_rect;
|
| + frame.root_damage_rect.Union(next_root_damage_rect_);
|
| + next_root_damage_rect_ = gfx::Rect();
|
| frame.root_damage_rect.Intersect(gfx::Rect(device_viewport_rect.size()));
|
| frame.device_viewport_rect = device_viewport_rect;
|
| frame.device_clip_rect = device_clip_rect;
|
| @@ -239,9 +241,16 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
|
| // If we have any copy requests, we can't remove any quads for overlays,
|
| // otherwise the framebuffer will be missing the overlay contents.
|
| if (root_render_pass->copy_requests.empty()) {
|
| - overlay_processor_->ProcessForOverlays(
|
| - resource_provider_, render_passes_in_draw_order, &frame.overlay_list,
|
| - &frame.root_damage_rect);
|
| + if (overlay_processor_->ProcessForCALayers(
|
| + resource_provider_, render_passes_in_draw_order,
|
| + &frame.ca_layer_overlay_list, &frame.overlay_list)) {
|
| + // Ensure that the next frame to use the backbuffer will do a full redraw.
|
| + next_root_damage_rect_.Union(root_render_pass->output_rect);
|
| + } else {
|
| + overlay_processor_->ProcessForOverlays(
|
| + resource_provider_, render_passes_in_draw_order, &frame.overlay_list,
|
| + &frame.root_damage_rect);
|
| + }
|
| }
|
|
|
| for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) {
|
|
|