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

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

Issue 2176303002: services/ui: Remove deprecated gpu code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 4 years, 4 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
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"
11 #include "cc/output/delegated_frame_data.h" 11 #include "cc/output/delegated_frame_data.h"
12 #include "services/shell/public/cpp/connection.h" 12 #include "services/shell/public/cpp/connection.h"
13 #include "services/shell/public/cpp/connector.h" 13 #include "services/shell/public/cpp/connector.h"
14 #include "services/ui/gles2/gpu_state.h"
15 #include "services/ui/public/interfaces/gpu.mojom.h" 14 #include "services/ui/public/interfaces/gpu.mojom.h"
16 #include "services/ui/surfaces/display_compositor.h" 15 #include "services/ui/surfaces/display_compositor.h"
17 #include "services/ui/surfaces/surfaces_state.h" 16 #include "services/ui/surfaces/surfaces_state.h"
18 #include "services/ui/ws/platform_display_factory.h" 17 #include "services/ui/ws/platform_display_factory.h"
19 #include "services/ui/ws/platform_display_init_params.h" 18 #include "services/ui/ws/platform_display_init_params.h"
20 #include "services/ui/ws/server_window.h" 19 #include "services/ui/ws/server_window.h"
21 #include "services/ui/ws/window_coordinate_conversions.h" 20 #include "services/ui/ws/window_coordinate_conversions.h"
22 #include "third_party/skia/include/core/SkXfermode.h" 21 #include "third_party/skia/include/core/SkXfermode.h"
23 #include "ui/base/cursor/cursor_loader.h" 22 #include "ui/base/cursor/cursor_loader.h"
24 #include "ui/display/display.h" 23 #include "ui/display/display.h"
(...skipping 28 matching lines...) Expand all
53 return new DefaultPlatformDisplay(init_params); 52 return new DefaultPlatformDisplay(init_params);
54 } 53 }
55 54
56 DefaultPlatformDisplay::DefaultPlatformDisplay( 55 DefaultPlatformDisplay::DefaultPlatformDisplay(
57 const PlatformDisplayInitParams& init_params) 56 const PlatformDisplayInitParams& init_params)
58 : display_id_(init_params.display_id), 57 : display_id_(init_params.display_id),
59 #if !defined(OS_ANDROID) 58 #if !defined(OS_ANDROID)
60 cursor_loader_(ui::CursorLoader::Create()), 59 cursor_loader_(ui::CursorLoader::Create()),
61 #endif 60 #endif
62 frame_generator_(new FrameGenerator(this, 61 frame_generator_(new FrameGenerator(this,
63 init_params.gpu_state,
64 init_params.surfaces_state)) { 62 init_params.surfaces_state)) {
65 metrics_.size_in_pixels = init_params.display_bounds.size(); 63 metrics_.size_in_pixels = init_params.display_bounds.size();
66 // TODO(rjkroege): Preserve the display_id when Ozone platform can use it. 64 // TODO(rjkroege): Preserve the display_id when Ozone platform can use it.
67 } 65 }
68 66
69 void DefaultPlatformDisplay::Init(PlatformDisplayDelegate* delegate) { 67 void DefaultPlatformDisplay::Init(PlatformDisplayDelegate* delegate) {
70 delegate_ = delegate; 68 delegate_ = delegate;
71 69
72 gfx::Rect bounds(metrics_.size_in_pixels); 70 gfx::Rect bounds(metrics_.size_in_pixels);
73 #if defined(OS_WIN) 71 #if defined(OS_WIN)
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return delegate_ ? delegate_->IsInHighContrastMode() : false; 273 return delegate_ ? delegate_->IsInHighContrastMode() : false;
276 } 274 }
277 275
278 const ViewportMetrics& DefaultPlatformDisplay::GetViewportMetrics() { 276 const ViewportMetrics& DefaultPlatformDisplay::GetViewportMetrics() {
279 return metrics_; 277 return metrics_;
280 } 278 }
281 279
282 } // namespace ws 280 } // namespace ws
283 281
284 } // namespace ui 282 } // 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