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

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

Issue 2336113003: Revert of cc: Plumb the monitor color profile to renderer for rasterization (Closed)
Patch Set: 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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack()); 1047 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack());
1048 } 1048 }
1049 1049
1050 // Ignore this during shutdown. 1050 // Ignore this during shutdown.
1051 if (!webwidget_) 1051 if (!webwidget_)
1052 return; 1052 return;
1053 1053
1054 if (compositor_) { 1054 if (compositor_) {
1055 compositor_->setViewportSize(params.physical_backing_size); 1055 compositor_->setViewportSize(params.physical_backing_size);
1056 compositor_->setBottomControlsHeight(params.bottom_controls_height); 1056 compositor_->setBottomControlsHeight(params.bottom_controls_height);
1057 compositor_->SetDeviceColorSpace(screen_info_.icc_profile.GetColorSpace());
1058 } 1057 }
1059 1058
1060 visible_viewport_size_ = params.visible_viewport_size; 1059 visible_viewport_size_ = params.visible_viewport_size;
1061 resizer_rect_ = params.resizer_rect; 1060 resizer_rect_ = params.resizer_rect;
1062 1061
1063 // NOTE: We may have entered fullscreen mode without changing our size. 1062 // NOTE: We may have entered fullscreen mode without changing our size.
1064 bool fullscreen_change = 1063 bool fullscreen_change =
1065 is_fullscreen_granted_ != params.is_fullscreen_granted; 1064 is_fullscreen_granted_ != params.is_fullscreen_granted;
1066 is_fullscreen_granted_ = params.is_fullscreen_granted; 1065 is_fullscreen_granted_ = params.is_fullscreen_granted;
1067 display_mode_ = params.display_mode; 1066 display_mode_ = params.display_mode;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 compositor_->setViewportSize(physical_backing_size_); 1129 compositor_->setViewportSize(physical_backing_size_);
1131 } 1130 }
1132 1131
1133 void RenderWidget::initializeLayerTreeView() { 1132 void RenderWidget::initializeLayerTreeView() {
1134 DCHECK(!host_closing_); 1133 DCHECK(!host_closing_);
1135 1134
1136 compositor_ = RenderWidgetCompositor::Create(this, device_scale_factor_, 1135 compositor_ = RenderWidgetCompositor::Create(this, device_scale_factor_,
1137 compositor_deps_); 1136 compositor_deps_);
1138 compositor_->setViewportSize(physical_backing_size_); 1137 compositor_->setViewportSize(physical_backing_size_);
1139 OnDeviceScaleFactorChanged(); 1138 OnDeviceScaleFactorChanged();
1140 compositor_->SetDeviceColorSpace(screen_info_.icc_profile.GetColorSpace());
1141 // For background pages and certain tests, we don't want to trigger 1139 // For background pages and certain tests, we don't want to trigger
1142 // OutputSurface creation. 1140 // OutputSurface creation.
1143 if (compositor_never_visible_ || !RenderThreadImpl::current()) 1141 if (compositor_never_visible_ || !RenderThreadImpl::current())
1144 compositor_->SetNeverVisible(); 1142 compositor_->SetNeverVisible();
1145 1143
1146 StartCompositor(); 1144 StartCompositor();
1147 } 1145 }
1148 1146
1149 void RenderWidget::WillCloseLayerTreeView() { 1147 void RenderWidget::WillCloseLayerTreeView() {
1150 if (host_closing_) 1148 if (host_closing_)
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 void RenderWidget::requestPointerUnlock() { 2126 void RenderWidget::requestPointerUnlock() {
2129 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); 2127 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get());
2130 } 2128 }
2131 2129
2132 bool RenderWidget::isPointerLocked() { 2130 bool RenderWidget::isPointerLocked() {
2133 return mouse_lock_dispatcher_->IsMouseLockedTo( 2131 return mouse_lock_dispatcher_->IsMouseLockedTo(
2134 webwidget_mouse_lock_target_.get()); 2132 webwidget_mouse_lock_target_.get());
2135 } 2133 }
2136 2134
2137 } // namespace content 2135 } // 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