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

Side by Side Diff: ui/ozone/platform/drm/gpu/gbm_device.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/gpu/gbm_buffer.cc ('k') | ui/ozone/platform/drm/gpu/gbm_surfaceless.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/gpu/gbm_device.h" 5 #include "ui/ozone/platform/drm/gpu/gbm_device.h"
6 6
7 #include <gbm.h> 7 #include <gbm.h>
8 #include <utility>
8 9
9 namespace ui { 10 namespace ui {
10 11
11 GbmDevice::GbmDevice(const base::FilePath& device_path, 12 GbmDevice::GbmDevice(const base::FilePath& device_path,
12 base::File file, 13 base::File file,
13 bool is_primary_device) 14 bool is_primary_device)
14 : DrmDevice(device_path, file.Pass(), is_primary_device) {} 15 : DrmDevice(device_path, std::move(file), is_primary_device) {}
15 16
16 GbmDevice::~GbmDevice() { 17 GbmDevice::~GbmDevice() {
17 if (device_) 18 if (device_)
18 gbm_device_destroy(device_); 19 gbm_device_destroy(device_);
19 } 20 }
20 21
21 bool GbmDevice::Initialize(bool use_atomic) { 22 bool GbmDevice::Initialize(bool use_atomic) {
22 if (!DrmDevice::Initialize(use_atomic)) 23 if (!DrmDevice::Initialize(use_atomic))
23 return false; 24 return false;
24 25
25 device_ = gbm_create_device(get_fd()); 26 device_ = gbm_create_device(get_fd());
26 if (!device_) { 27 if (!device_) {
27 PLOG(ERROR) << "Unable to initialize GBM for " << device_path().value(); 28 PLOG(ERROR) << "Unable to initialize GBM for " << device_path().value();
28 return false; 29 return false;
29 } 30 }
30 31
31 return true; 32 return true;
32 } 33 }
33 34
34 } // namespace ui 35 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer.cc ('k') | ui/ozone/platform/drm/gpu/gbm_surfaceless.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698