| Index: cc/output/direct_renderer.cc
|
| diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
|
| index 16dcd5a3d3c35a8379c12ebb79ec20b9a6afec34..a1d3a65a8a11b6b1eb17f7e7edb0d52442f3e90e 100644
|
| --- a/cc/output/direct_renderer.cc
|
| +++ b/cc/output/direct_renderer.cc
|
| @@ -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,26 +241,37 @@ 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);
|
| -
|
| - // No need to render in case the damage rect is completely composited using
|
| - // overlays and dont have any copy requests.
|
| - if (frame.root_damage_rect.IsEmpty()) {
|
| - bool handle_copy_requests = false;
|
| - for (auto* pass : *render_passes_in_draw_order) {
|
| - if (!pass->copy_requests.empty()) {
|
| - handle_copy_requests = true;
|
| - break;
|
| + 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);
|
| +
|
| + // No need to render in case the damage rect is completely composited
|
| + // using
|
| + // overlays and dont have any copy requests.
|
| + if (frame.root_damage_rect.IsEmpty()) {
|
| + bool handle_copy_requests = false;
|
| + for (auto* pass : *render_passes_in_draw_order) {
|
| + if (!pass->copy_requests.empty()) {
|
| + handle_copy_requests = true;
|
| + break;
|
| + }
|
| }
|
| - }
|
|
|
| - if (!handle_copy_requests) {
|
| - BindFramebufferToOutputSurface(&frame);
|
| - FinishDrawingFrame(&frame);
|
| - render_passes_in_draw_order->clear();
|
| - return;
|
| + if (!handle_copy_requests) {
|
| + BindFramebufferToOutputSurface(&frame);
|
| + FinishDrawingFrame(&frame);
|
| + render_passes_in_draw_order->clear();
|
| + return;
|
| + }
|
| + overlay_processor_->ProcessForOverlays(
|
| + resource_provider_, render_passes_in_draw_order,
|
| + &frame.overlay_list, &frame.root_damage_rect);
|
| }
|
| }
|
| }
|
|
|