Commit b18eab99 authored by Richard Li's avatar Richard Li Committed by Commit Bot

Skip processing HDR content in OverlayProcessor when Chrome is in HDR mode

Although overlay cannot process HDR video without colorspace degraded,
renderpass will still be sent to OverlayProcessor. Since there isn't an
explicit skipping policy for processing HDR content with overlay in HDR
mode, this CL adds an condition to skip further processing when target
colorspace is HDR.


Change-Id: I14d2c39a332827990b950ee04f5174ddac0f1ee0
Bug: 1036736
Change-Id: I14d2c39a332827990b950ee04f5174ddac0f1ee0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1977848Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Commit-Queue: Richard Li <richard.li@intel.com>
Cr-Commit-Position: refs/heads/master@{#728432}
parent fdbf4c5b
......@@ -44,8 +44,9 @@ void OverlayProcessorWin::ProcessForOverlays(
std::vector<gfx::Rect>* content_bounds) {
TRACE_EVENT0("viz", "OverlayProcessorWin::ProcessForOverlays");
RenderPass* root_render_pass = render_passes->back().get();
// Skip overlay processing if we have copy request.
if (!render_passes->back()->copy_requests.empty()) {
if (!root_render_pass->copy_requests.empty()) {
damage_rect->Union(dc_layer_overlay_processor_
->previous_frame_overlay_damage_contribution());
// Update damage rect before calling ClearOverlayState, otherwise
......@@ -54,11 +55,17 @@ void OverlayProcessorWin::ProcessForOverlays(
return;
}
// Skip overlay processing if output colorspace is HDR.
// Since Overlay only supports NV12 and YUY2 now, HDR content (usually P010
// format) cannot output through overlay without format degrading.
if (root_render_pass->color_space.IsHDR())
return;
if (!enable_dc_overlay_)
return;
dc_layer_overlay_processor_->Process(
resource_provider, gfx::RectF(render_passes->back()->output_rect),
resource_provider, gfx::RectF(root_render_pass->output_rect),
render_passes, damage_rect, candidates);
}
......
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