Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: content/renderer/render_widget.cc

Issue 2325773003: cc: Plumb the monitor color profile to renderer for rasterization (Closed)
Patch Set: Unrevert Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/display/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack()); 1050 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack());
1051 } 1051 }
1052 1052
1053 // Ignore this during shutdown. 1053 // Ignore this during shutdown.
1054 if (!GetWebWidget()) 1054 if (!GetWebWidget())
1055 return; 1055 return;
1056 1056
1057 if (compositor_) { 1057 if (compositor_) {
1058 compositor_->setViewportSize(params.physical_backing_size); 1058 compositor_->setViewportSize(params.physical_backing_size);
1059 compositor_->setBottomControlsHeight(params.bottom_controls_height); 1059 compositor_->setBottomControlsHeight(params.bottom_controls_height);
1060 compositor_->SetDeviceColorSpace(screen_info_.icc_profile.GetColorSpace());
1060 } 1061 }
1061 1062
1062 visible_viewport_size_ = params.visible_viewport_size; 1063 visible_viewport_size_ = params.visible_viewport_size;
1063 resizer_rect_ = params.resizer_rect; 1064 resizer_rect_ = params.resizer_rect;
1064 1065
1065 // NOTE: We may have entered fullscreen mode without changing our size. 1066 // NOTE: We may have entered fullscreen mode without changing our size.
1066 bool fullscreen_change = 1067 bool fullscreen_change =
1067 is_fullscreen_granted_ != params.is_fullscreen_granted; 1068 is_fullscreen_granted_ != params.is_fullscreen_granted;
1068 is_fullscreen_granted_ = params.is_fullscreen_granted; 1069 is_fullscreen_granted_ = params.is_fullscreen_granted;
1069 display_mode_ = params.display_mode; 1070 display_mode_ = params.display_mode;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 compositor_->setViewportSize(physical_backing_size_); 1133 compositor_->setViewportSize(physical_backing_size_);
1133 } 1134 }
1134 1135
1135 void RenderWidget::initializeLayerTreeView() { 1136 void RenderWidget::initializeLayerTreeView() {
1136 DCHECK(!host_closing_); 1137 DCHECK(!host_closing_);
1137 1138
1138 compositor_ = RenderWidgetCompositor::Create(this, device_scale_factor_, 1139 compositor_ = RenderWidgetCompositor::Create(this, device_scale_factor_,
1139 compositor_deps_); 1140 compositor_deps_);
1140 compositor_->setViewportSize(physical_backing_size_); 1141 compositor_->setViewportSize(physical_backing_size_);
1141 OnDeviceScaleFactorChanged(); 1142 OnDeviceScaleFactorChanged();
1143 compositor_->SetDeviceColorSpace(screen_info_.icc_profile.GetColorSpace());
1142 // For background pages and certain tests, we don't want to trigger 1144 // For background pages and certain tests, we don't want to trigger
1143 // OutputSurface creation. 1145 // OutputSurface creation.
1144 if (compositor_never_visible_ || !RenderThreadImpl::current()) 1146 if (compositor_never_visible_ || !RenderThreadImpl::current())
1145 compositor_->SetNeverVisible(); 1147 compositor_->SetNeverVisible();
1146 1148
1147 StartCompositor(); 1149 StartCompositor();
1148 } 1150 }
1149 1151
1150 void RenderWidget::WillCloseLayerTreeView() { 1152 void RenderWidget::WillCloseLayerTreeView() {
1151 if (host_closing_) 1153 if (host_closing_)
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 bool RenderWidget::isPointerLocked() { 2151 bool RenderWidget::isPointerLocked() {
2150 return mouse_lock_dispatcher_->IsMouseLockedTo( 2152 return mouse_lock_dispatcher_->IsMouseLockedTo(
2151 webwidget_mouse_lock_target_.get()); 2153 webwidget_mouse_lock_target_.get());
2152 } 2154 }
2153 2155
2154 blink::WebWidget* RenderWidget::GetWebWidget() const { 2156 blink::WebWidget* RenderWidget::GetWebWidget() const {
2155 return webwidget_internal_; 2157 return webwidget_internal_;
2156 } 2158 }
2157 2159
2158 } // namespace content 2160 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/display/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698