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

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

Issue 2470143006: Remove dependency on SurfaceManager in FrameGenerator (Closed)
Patch Set: Remove a couple of bad std::moves 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 return new DefaultPlatformDisplay(init_params); 51 return new DefaultPlatformDisplay(init_params);
52 } 52 }
53 53
54 DefaultPlatformDisplay::DefaultPlatformDisplay( 54 DefaultPlatformDisplay::DefaultPlatformDisplay(
55 const PlatformDisplayInitParams& init_params) 55 const PlatformDisplayInitParams& init_params)
56 : id_(init_params.display_id), 56 : id_(init_params.display_id),
57 #if !defined(OS_ANDROID) 57 #if !defined(OS_ANDROID)
58 cursor_loader_(ui::CursorLoader::Create()), 58 cursor_loader_(ui::CursorLoader::Create()),
59 #endif 59 #endif
60 frame_generator_(new FrameGenerator(this, 60 frame_generator_(new FrameGenerator(this, init_params.root_window)),
61 init_params.root_window,
62 init_params.display_compositor)),
63 metrics_(init_params.metrics) { 61 metrics_(init_params.metrics) {
64 } 62 }
65 63
66 void DefaultPlatformDisplay::Init(PlatformDisplayDelegate* delegate) { 64 void DefaultPlatformDisplay::Init(PlatformDisplayDelegate* delegate) {
67 delegate_ = delegate; 65 delegate_ = delegate;
68 66
69 DCHECK(!metrics_.pixel_size.IsEmpty()); 67 DCHECK(!metrics_.pixel_size.IsEmpty());
70 68
71 // TODO(kylechar): The origin here isn't right if any displays have 69 // TODO(kylechar): The origin here isn't right if any displays have
72 // scale_factor other than 1.0 but will prevent windows from being stacked. 70 // scale_factor other than 1.0 but will prevent windows from being stacked.
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 return delegate_->GetRootWindow(); 285 return delegate_->GetRootWindow();
288 } 286 }
289 287
290 bool DefaultPlatformDisplay::IsInHighContrastMode() { 288 bool DefaultPlatformDisplay::IsInHighContrastMode() {
291 return delegate_ ? delegate_->IsInHighContrastMode() : false; 289 return delegate_ ? delegate_->IsInHighContrastMode() : false;
292 } 290 }
293 291
294 } // namespace ws 292 } // namespace ws
295 293
296 } // namespace ui 294 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/frame_generator_unittest.cc ('k') | services/ui/ws/platform_display_init_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698