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

Side by Side Diff: ui/ozone/platform/drm/ozone_platform_gbm.cc

Issue 1528373002: Replace Pass() with std::move in ui/ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add #include <utility> Created 5 years 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 | « ui/ozone/platform/drm/host/drm_display_host_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/ozone/platform/drm/ozone_platform_gbm.h" 5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <gbm.h> 9 #include <gbm.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 #include <xf86drm.h> 11 #include <xf86drm.h>
12 #include <utility>
12 13
13 #include "base/bind.h" 14 #include "base/bind.h"
14 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 15 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
15 #include "ui/events/ozone/device/device_manager.h" 16 #include "ui/events/ozone/device/device_manager.h"
16 #include "ui/events/ozone/evdev/event_factory_evdev.h" 17 #include "ui/events/ozone/evdev/event_factory_evdev.h"
17 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" 18 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
18 #include "ui/ozone/platform/drm/common/drm_util.h" 19 #include "ui/ozone/platform/drm/common/drm_util.h"
19 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" 20 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h"
20 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" 21 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h"
21 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h" 22 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return event_factory_ozone_->CreateSystemInputInjector(); 99 return event_factory_ozone_->CreateSystemInputInjector();
99 } 100 }
100 scoped_ptr<PlatformWindow> CreatePlatformWindow( 101 scoped_ptr<PlatformWindow> CreatePlatformWindow(
101 PlatformWindowDelegate* delegate, 102 PlatformWindowDelegate* delegate,
102 const gfx::Rect& bounds) override { 103 const gfx::Rect& bounds) override {
103 scoped_ptr<DrmWindowHost> platform_window( 104 scoped_ptr<DrmWindowHost> platform_window(
104 new DrmWindowHost(delegate, bounds, gpu_platform_support_host_.get(), 105 new DrmWindowHost(delegate, bounds, gpu_platform_support_host_.get(),
105 event_factory_ozone_.get(), cursor_.get(), 106 event_factory_ozone_.get(), cursor_.get(),
106 window_manager_.get(), display_manager_.get())); 107 window_manager_.get(), display_manager_.get()));
107 platform_window->Initialize(); 108 platform_window->Initialize();
108 return platform_window.Pass(); 109 return std::move(platform_window);
109 } 110 }
110 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 111 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
111 return make_scoped_ptr( 112 return make_scoped_ptr(
112 new DrmNativeDisplayDelegate(display_manager_.get())); 113 new DrmNativeDisplayDelegate(display_manager_.get()));
113 } 114 }
114 base::ScopedFD OpenClientNativePixmapDevice() const override { 115 base::ScopedFD OpenClientNativePixmapDevice() const override {
115 #if defined(USE_VGEM_MAP) 116 #if defined(USE_VGEM_MAP)
116 int vgem_fd = drmOpenWithType("vgem", nullptr, DRM_NODE_RENDER); 117 int vgem_fd = drmOpenWithType("vgem", nullptr, DRM_NODE_RENDER);
117 if (vgem_fd < 0) { 118 if (vgem_fd < 0) {
118 PLOG(ERROR) << "Failed to find vgem device"; 119 PLOG(ERROR) << "Failed to find vgem device";
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); 182 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm);
182 }; 183 };
183 184
184 } // namespace 185 } // namespace
185 186
186 OzonePlatform* CreateOzonePlatformGbm() { 187 OzonePlatform* CreateOzonePlatformGbm() {
187 return new OzonePlatformGbm; 188 return new OzonePlatformGbm;
188 } 189 }
189 190
190 } // namespace ui 191 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/host/drm_display_host_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698