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

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: 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
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 8
9 namespace ui { 9 namespace ui {
10 10
11 GbmDevice::GbmDevice(const base::FilePath& device_path, 11 GbmDevice::GbmDevice(const base::FilePath& device_path,
12 base::File file, 12 base::File file,
13 bool is_primary_device) 13 bool is_primary_device)
14 : DrmDevice(device_path, file.Pass(), is_primary_device) {} 14 : DrmDevice(device_path, std::move(file), is_primary_device) {}
15 15
16 GbmDevice::~GbmDevice() { 16 GbmDevice::~GbmDevice() {
17 if (device_) 17 if (device_)
18 gbm_device_destroy(device_); 18 gbm_device_destroy(device_);
19 } 19 }
20 20
21 bool GbmDevice::Initialize(bool use_atomic) { 21 bool GbmDevice::Initialize(bool use_atomic) {
22 if (!DrmDevice::Initialize(use_atomic)) 22 if (!DrmDevice::Initialize(use_atomic))
23 return false; 23 return false;
24 24
25 device_ = gbm_create_device(get_fd()); 25 device_ = gbm_create_device(get_fd());
26 if (!device_) { 26 if (!device_) {
27 PLOG(ERROR) << "Unable to initialize GBM for " << device_path().value(); 27 PLOG(ERROR) << "Unable to initialize GBM for " << device_path().value();
28 return false; 28 return false;
29 } 29 }
30 30
31 return true; 31 return true;
32 } 32 }
33 33
34 } // namespace ui 34 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698