New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 687357 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 687346

Blocking:
issue 696742
issue 703798



Sign in to add a comment

HDR: cc: Add gamma adjustment render pass after all compositing

Project Member Reported by ccameron@chromium.org, Jan 31 2017

Issue description

HDR on Windows may require gamma=1, which will break blending of the web.

The simplest fix for this is to render everything into a RGBA_16F buffer with an assumed gamma=2.2 (or sRGB transfer function), and then convert the result into a gamma=1 buffer in a final render pass.

This is simlar to the mixed-linear-and-not-linear blending discussed in
https://docs.google.com/document/d/1ZalDw-R5G8rFICZdKG--NRKnVkJbEUMAF7fPivE9lN0/edit
 
Blockedon: 687346

Comment 2 by hubbe@chromium.org, Jan 31 2017

FYI: It is likely that hardware-decoded HDR video will reach the compositor in the form of an RGBA_16F texture with gamma 1.0. Not sure if that changes anything, but I wanted to make sure you knew about it.

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/625dae1ec4772b0842e701d5771b4b08154d0df6

commit 625dae1ec4772b0842e701d5771b4b08154d0df6
Author: ccameron <ccameron@chromium.org>
Date: Mon Feb 13 23:44:44 2017

cc: Move output color space from DrawingFrame to RenderPass

This assigns a color space to each RenderPass during surface
aggregation. For the moment, this just means using the output
color space, but in the future it can be used to create a final
color conversion render pass for exotic color spaces.

The OutputSurface is assigned the color space of the root
RenderPass.

Add tests to ensure that the color spaces changes are propagated
through to the RenderPass and the OutputSurface.

BUG= 687357 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2693723002
Cr-Commit-Position: refs/heads/master@{#450151}

[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/ipc/cc_param_traits.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/ipc/cc_param_traits_unittest.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/ipc/render_pass.mojom
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/ipc/render_pass_struct_traits.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/ipc/render_pass_struct_traits.h
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/output/direct_renderer.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/output/direct_renderer.h
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/output/gl_renderer.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/output/gl_renderer_unittest.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/output/overlay_unittest.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/output/software_renderer_unittest.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/quads/render_pass.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/quads/render_pass.h
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/quads/render_pass_unittest.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/surfaces/display.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/surfaces/display_unittest.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/surfaces/surface_aggregator.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/surfaces/surface_aggregator.h
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/surfaces/surface_aggregator_unittest.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/test/fake_output_surface.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/test/fake_output_surface.h
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/cc/test/pixel_test.cc
[modify] https://crrev.com/625dae1ec4772b0842e701d5771b4b08154d0df6/ui/gfx/color_space.h

Blocking: 696742
Attaching a test page to explain this a bit (I'll attach output in a moment).

raster-vs-composite-blending.html
761 bytes View Download
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f68a49d843d30417077a09ac37bff4491be4e0c

commit 3f68a49d843d30417077a09ac37bff4491be4e0c
Author: ccameron <ccameron@chromium.org>
Date: Tue Mar 07 23:05:08 2017

HDR: Do nonlinear blending in the compositor

Specify a color space for blending to the SurfaceAggregator, in addition
to the output color space. If the color space for blending is not the
same as the output color space, then add a separate render pass to
convert from the blending color space to the output color space.
Add a SurfaceAggregator test for this.

This is used by HDR output, because the output is in linear space, while
web content expects to be blended according in sRGB value space.
Add gfx::ColorSpace::CreateExtendedSRGB as the default space in which
to do blending for HDR content.

Change the meaning of the flag kEnableHDROutput to not enable color
aware rasterization, only compositing.

Change the GLRenderer to use half-float textures for render passes that
are output-ing to HDR color spaces. This can't be tested (yet) because
of Mesa limitations.

R=enne
TBR=sky (for mash)
BUG= 687357 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2728173004
Cr-Commit-Position: refs/heads/master@{#455274}

[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/cc/output/gl_renderer.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/cc/output/gl_renderer_unittest.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/cc/surfaces/display.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/cc/surfaces/display.h
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/cc/surfaces/display_unittest.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/cc/surfaces/surface_aggregator.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/cc/surfaces/surface_aggregator.h
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/cc/surfaces/surface_aggregator_unittest.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/components/display_compositor/gpu_root_compositor_frame_sink.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/content/browser/compositor/gpu_process_transport_factory.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/content/browser/compositor/gpu_process_transport_factory.h
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/mash/test/mash_test_suite.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/ui/compositor/compositor.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/ui/compositor/compositor.h
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/ui/compositor/test/in_process_context_factory.h
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/ui/gfx/color_space.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/ui/gfx/color_space.h
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/ui/gfx/color_space_win.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/ui/gfx/color_transform.cc
[modify] https://crrev.com/3f68a49d843d30417077a09ac37bff4491be4e0c/ui/gfx/color_transform_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Mar 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c6d2707d8ea850c862f04ac066724273981e88f

commit 2c6d2707d8ea850c862f04ac066724273981e88f
Author: ccameron <ccameron@chromium.org>
Date: Wed Mar 08 19:42:42 2017

cc: Clarify that color spaces are for raster

The color spaces that are sent to cc::LayerTree and friends are to be
used for rasterization. They happen to be based on the display's color
space, but that just confuses things.

Also, LayerTreeSettings::color_correct_rendering really only has to do
with rasterization, so, rename it to color_correct_rasterization.

R=enne
TBR=esprehn (content/)
BUG= 687357 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2735943002
Cr-Commit-Position: refs/heads/master@{#455517}

[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/resources/resource_provider.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/resources/resource_provider.h
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/test/fake_tile_manager_client.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/test/fake_tile_manager_client.h
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/test/pixel_test.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/tiles/tile_manager.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/tiles/tile_manager.h
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/trees/layer_tree_host.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/trees/layer_tree_host.h
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/trees/layer_tree_host_impl.h
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/trees/layer_tree_host_unittest.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/trees/layer_tree_impl.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/trees/layer_tree_impl.h
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/trees/layer_tree_impl_unittest.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/cc/trees/layer_tree_settings.h
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/content/renderer/gpu/render_widget_compositor.h
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/content/renderer/render_widget.cc
[modify] https://crrev.com/2c6d2707d8ea850c862f04ac066724273981e88f/ui/compositor/compositor.cc

Status: Fixed (was: Assigned)
This is fixed.

Blending is done in extended-sRGB space. For the moment (until we get color correct raster in  issue 697675 ), we should have HDR displays rasterize into sRGB so that all colors match.
Blocking: 703798

Sign in to add a comment