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

Side by Side Diff: ui/ozone/platform/cast/surface_factory_cast.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/cast/surface_factory_cast.h" 5 #include "ui/ozone/platform/cast/surface_factory_cast.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <EGL/egl.h> 8 #include <EGL/egl.h>
9 9
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 SurfaceFactoryCast::SurfaceFactoryCast() : SurfaceFactoryCast(nullptr) {} 70 SurfaceFactoryCast::SurfaceFactoryCast() : SurfaceFactoryCast(nullptr) {}
71 71
72 SurfaceFactoryCast::SurfaceFactoryCast(scoped_ptr<CastEglPlatform> egl_platform) 72 SurfaceFactoryCast::SurfaceFactoryCast(scoped_ptr<CastEglPlatform> egl_platform)
73 : state_(kUninitialized), 73 : state_(kUninitialized),
74 display_type_(0), 74 display_type_(0),
75 have_display_type_(false), 75 have_display_type_(false),
76 window_(0), 76 window_(0),
77 display_size_(GetInitialDisplaySize()), 77 display_size_(GetInitialDisplaySize()),
78 new_display_size_(GetInitialDisplaySize()), 78 new_display_size_(GetInitialDisplaySize()),
79 egl_platform_(egl_platform.Pass()) { 79 egl_platform_(std::move(egl_platform)) {}
80 }
81 80
82 SurfaceFactoryCast::~SurfaceFactoryCast() { 81 SurfaceFactoryCast::~SurfaceFactoryCast() {
83 ShutdownHardware(); 82 ShutdownHardware();
84 } 83 }
85 84
86 void SurfaceFactoryCast::InitializeHardware() { 85 void SurfaceFactoryCast::InitializeHardware() {
87 if (state_ == kInitialized) { 86 if (state_ == kInitialized) {
88 return; 87 return;
89 } 88 }
90 CHECK_EQ(state_, kUninitialized); 89 CHECK_EQ(state_, kUninitialized);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 return false; 276 return false;
278 } 277 }
279 278
280 set_gl_get_proc_address.Run(gl_proc); 279 set_gl_get_proc_address.Run(gl_proc);
281 add_gl_library.Run(lib_egl); 280 add_gl_library.Run(lib_egl);
282 add_gl_library.Run(lib_gles2); 281 add_gl_library.Run(lib_gles2);
283 return true; 282 return true;
284 } 283 }
285 284
286 } // namespace ui 285 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698