| Index: cc/trees/layer_tree_impl.cc
|
| diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
|
| index 1aad8e4acf9d0c2508c00c8a2f560735be0f0d1c..1648cfb376b96d9962b89cbae273cf321912fc39 100644
|
| --- a/cc/trees/layer_tree_impl.cc
|
| +++ b/cc/trees/layer_tree_impl.cc
|
| @@ -88,6 +88,8 @@ LayerTreeImpl::LayerTreeImpl(
|
| top_controls_height_(0),
|
| bottom_controls_height_(0),
|
| top_controls_shown_ratio_(top_controls_shown_ratio) {
|
| + if (layer_tree_host_impl_->settings().enable_color_correct_rendering)
|
| + device_color_space_ = gfx::ColorSpace::CreateSRGB();
|
| property_trees()->is_main_thread = false;
|
| }
|
|
|
| @@ -872,6 +874,15 @@ void LayerTreeImpl::SetDeviceColorSpace(
|
| const gfx::ColorSpace& device_color_space) {
|
| if (device_color_space == device_color_space_)
|
| return;
|
| +
|
| + // If color correct rendering is enabled, the default color space must be
|
| + // SRGB.
|
| + if (layer_tree_host_impl_->settings().enable_color_correct_rendering &&
|
| + device_color_space == gfx::ColorSpace()) {
|
| + device_color_space_ = gfx::ColorSpace::CreateSRGB();
|
| + return;
|
| + }
|
| +
|
| device_color_space_ = device_color_space;
|
| }
|
|
|
|
|