Commit 5bd86acd authored by Vasiliy Telezhnikov's avatar Vasiliy Telezhnikov Committed by Commit Bot

aw: Fix CopyOutput for viz

Previously code was sending CopyOutputRequest from ChildFrame only if
the root renderer submitted frame, which is incorrect. This CL
addresses the issue.

Bug: 805739
Change-Id: Ic1f1243fe0d9b660773a9dbd753a09218880f72b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2037638Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738354}
parent 12a86d61
...@@ -152,6 +152,15 @@ void HardwareRendererViz::OnViz::DrawAndSwapOnViz( ...@@ -152,6 +152,15 @@ void HardwareRendererViz::OnViz::DrawAndSwapOnViz(
without_gpu_->SubmitChildCompositorFrame(child_frame); without_gpu_->SubmitChildCompositorFrame(child_frame);
} }
if (!child_frame->copy_requests.empty()) {
viz::FrameSinkManagerImpl* manager = GetFrameSinkManager();
CopyOutputRequestQueue requests;
requests.swap(child_frame->copy_requests);
for (auto& copy_request : requests) {
manager->RequestCopyOfOutput(child_id, std::move(copy_request));
}
}
gfx::DisplayColorSpaces display_color_spaces( gfx::DisplayColorSpaces display_color_spaces(
color_space.IsValid() ? color_space : gfx::ColorSpace::CreateSRGB()); color_space.IsValid() ? color_space : gfx::ColorSpace::CreateSRGB());
display_->SetDisplayColorSpaces(display_color_spaces); display_->SetDisplayColorSpaces(display_color_spaces);
......
...@@ -195,13 +195,6 @@ void RootFrameSink::SubmitChildCompositorFrame(ChildFrame* child_frame) { ...@@ -195,13 +195,6 @@ void RootFrameSink::SubmitChildCompositorFrame(ChildFrame* child_frame) {
child_frame->local_surface_id, std::move(*child_frame->frame), child_frame->local_surface_id, std::move(*child_frame->frame),
std::move(child_frame->hit_test_region_list)); std::move(child_frame->hit_test_region_list));
child_frame->frame.reset(); child_frame->frame.reset();
CopyOutputRequestQueue requests;
requests.swap(child_frame->copy_requests);
for (auto& copy_request : requests) {
child_sink_support_->support()->RequestCopyOfOutput(
child_frame->local_surface_id, std::move(copy_request));
}
} }
viz::FrameTimingDetailsMap RootFrameSink::TakeChildFrameTimingDetailsMap() { viz::FrameTimingDetailsMap RootFrameSink::TakeChildFrameTimingDetailsMap() {
......
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