Commit cf6b9461 authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

Reland "Fix render issue with render pass overlays on macOS"

This is a reland of 1bcf9a08

Original change's description:
> Fix render issue with render pass overlays on macOS
>
> The problem is because damage of a frame may not contain the whole
> render pass area, and then the overlay backing will not be drawn
> completely. Fix the problem by ignoring the frame damage area.
> This CL also fixes some sync token issues.
>
> Bug: 1135727
> Change-Id: I6354b235fb9a7ffdeffe9c9270576ee648a7ba4d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2464914
> Commit-Queue: Peng Huang <penghuang@chromium.org>
> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#816651}

Bug: 1135727
Change-Id: I0b2aa8668dd73120828587bd013f12b0e4348ddd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2481342
Commit-Queue: Peng Huang <penghuang@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Auto-Submit: Peng Huang <penghuang@chromium.org>
Reviewed-by: default avatarVasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818092}
parent f38a2046
......@@ -2591,10 +2591,13 @@ void SkiaRenderer::PrepareRenderPassOverlay(CALayerOverlay* overlay) {
overlay->rpdq = nullptr;
gfx::Transform target_to_device =
current_frame()->window_matrix * current_frame()->projection_matrix;
const gfx::Rect* scissor = is_scissor_enabled_ ? &scissor_rect_ : nullptr;
// Use nullptr scissor, so we can always render the whole render pass in an
// overlay backing.
// TODO(penghuang): reusing overlay backing from previous frame to avoid
// reproducing the overlay backing if the render pass content quad properties
// and content are not changed.
DrawQuadParams params = CalculateDrawQuadParams(
target_to_device, scissor, quad, /*draw_region=*/nullptr);
target_to_device, /*scissor=*/nullptr, quad, /*draw_region=*/nullptr);
DrawRPDQParams rpdq_params = CalculateRPDQParams(quad, &params);
// |filter_bounds| is the content space bounds that includes any filtered
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment