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

Side by Side Diff: services/ui/ws/platform_display.cc

Issue 2489003002: Convert mustash use surface references. (Closed)
Patch Set: Rebase + fixes. Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/ws/platform_display.h" 5 #include "services/ui/ws/platform_display.h"
6 6
7 #include "base/numerics/safe_conversions.h" 7 #include "base/numerics/safe_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "cc/ipc/quads.mojom.h" 9 #include "cc/ipc/quads.mojom.h"
10 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 bool DefaultPlatformDisplay::IsPrimaryDisplay() const { 151 bool DefaultPlatformDisplay::IsPrimaryDisplay() const {
152 return display::PlatformScreen::GetInstance()->GetPrimaryDisplayId() == id_; 152 return display::PlatformScreen::GetInstance()->GetPrimaryDisplayId() == id_;
153 } 153 }
154 154
155 void DefaultPlatformDisplay::OnGpuChannelEstablished( 155 void DefaultPlatformDisplay::OnGpuChannelEstablished(
156 scoped_refptr<gpu::GpuChannelHost> channel) { 156 scoped_refptr<gpu::GpuChannelHost> channel) {
157 frame_generator_->OnGpuChannelEstablished(channel); 157 frame_generator_->OnGpuChannelEstablished(channel);
158 } 158 }
159 159
160 FrameGenerator* DefaultPlatformDisplay::GetFrameGenerator() {
161 return frame_generator_.get();
162 }
163
160 bool DefaultPlatformDisplay::UpdateViewportMetrics( 164 bool DefaultPlatformDisplay::UpdateViewportMetrics(
161 const display::ViewportMetrics& metrics) { 165 const display::ViewportMetrics& metrics) {
162 if (metrics_ == metrics) 166 if (metrics_ == metrics)
163 return false; 167 return false;
164 168
165 gfx::Rect bounds = platform_window_->GetBounds(); 169 gfx::Rect bounds = platform_window_->GetBounds();
166 if (bounds.size() != metrics.pixel_size) { 170 if (bounds.size() != metrics.pixel_size) {
167 bounds.set_size(metrics.pixel_size); 171 bounds.set_size(metrics.pixel_size);
168 platform_window_->SetBounds(bounds); 172 platform_window_->SetBounds(bounds);
169 } 173 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 269
266 void DefaultPlatformDisplay::OnActivationChanged(bool active) {} 270 void DefaultPlatformDisplay::OnActivationChanged(bool active) {}
267 271
268 bool DefaultPlatformDisplay::IsInHighContrastMode() { 272 bool DefaultPlatformDisplay::IsInHighContrastMode() {
269 return delegate_ ? delegate_->IsInHighContrastMode() : false; 273 return delegate_ ? delegate_->IsInHighContrastMode() : false;
270 } 274 }
271 275
272 } // namespace ws 276 } // namespace ws
273 277
274 } // namespace ui 278 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698