OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 | 673 |
674 bool RenderWidgetHostImpl::GetResizeParams(ResizeParams* resize_params) { | 674 bool RenderWidgetHostImpl::GetResizeParams(ResizeParams* resize_params) { |
675 *resize_params = ResizeParams(); | 675 *resize_params = ResizeParams(); |
676 | 676 |
677 GetScreenInfo(&resize_params->screen_info); | 677 GetScreenInfo(&resize_params->screen_info); |
678 | 678 |
679 // Pretend that HDR displays are sRGB so that we do not have inconsistent | 679 // Pretend that HDR displays are sRGB so that we do not have inconsistent |
680 // coloring. | 680 // coloring. |
681 // TODO(ccameron): Disable this once color correct rasterization is functional | 681 // TODO(ccameron): Disable this once color correct rasterization is functional |
682 // https://crbug.com/701942 | 682 // https://crbug.com/701942 |
683 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHDR)) { | 683 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHDR)) |
684 gfx::ColorSpace::CreateSRGB().GetICCProfile( | 684 resize_params->screen_info.color_space = gfx::ColorSpace::CreateSRGB(); |
685 &resize_params->screen_info.icc_profile); | |
686 } | |
687 | 685 |
688 if (delegate_) { | 686 if (delegate_) { |
689 resize_params->is_fullscreen_granted = | 687 resize_params->is_fullscreen_granted = |
690 delegate_->IsFullscreenForCurrentTab(); | 688 delegate_->IsFullscreenForCurrentTab(); |
691 resize_params->display_mode = delegate_->GetDisplayMode(this); | 689 resize_params->display_mode = delegate_->GetDisplayMode(this); |
692 } else { | 690 } else { |
693 resize_params->is_fullscreen_granted = false; | 691 resize_params->is_fullscreen_granted = false; |
694 resize_params->display_mode = blink::kWebDisplayModeBrowser; | 692 resize_params->display_mode = blink::kWebDisplayModeBrowser; |
695 } | 693 } |
696 | 694 |
(...skipping 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2697 device::mojom::WakeLockType::PreventDisplaySleep, | 2695 device::mojom::WakeLockType::PreventDisplaySleep, |
2698 device::mojom::WakeLockReason::ReasonOther, "GetSnapshot", | 2696 device::mojom::WakeLockReason::ReasonOther, "GetSnapshot", |
2699 std::move(request)); | 2697 std::move(request)); |
2700 } | 2698 } |
2701 } | 2699 } |
2702 return wake_lock_.get(); | 2700 return wake_lock_.get(); |
2703 } | 2701 } |
2704 #endif | 2702 #endif |
2705 | 2703 |
2706 } // namespace content | 2704 } // namespace content |
OLD | NEW |