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

Unified Diff: ui/ozone/platform/drm/gpu/screen_manager.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/mock_drm_device.cc ('k') | ui/ozone/platform/drm/gpu/screen_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/screen_manager.cc
diff --git a/ui/ozone/platform/drm/gpu/screen_manager.cc b/ui/ozone/platform/drm/gpu/screen_manager.cc
index 52959847af076e46e0e00e51e1caa6542b419935..ca58acd5d0afbdaf7ef173b2867f05c8d25bb932 100644
--- a/ui/ozone/platform/drm/gpu/screen_manager.cc
+++ b/ui/ozone/platform/drm/gpu/screen_manager.cc
@@ -5,6 +5,7 @@
#include "ui/ozone/platform/drm/gpu/screen_manager.h"
#include <xf86drmMode.h>
+#include <utility>
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/gfx/geometry/point.h"
@@ -216,7 +217,7 @@ HardwareDisplayController* ScreenManager::GetDisplayController(
void ScreenManager::AddWindow(gfx::AcceleratedWidget widget,
scoped_ptr<DrmWindow> window) {
std::pair<WidgetToWindowMap::iterator, bool> result =
- window_map_.add(widget, window.Pass());
+ window_map_.add(widget, std::move(window));
DCHECK(result.second) << "Window already added.";
UpdateControllerToWindowMapping();
}
@@ -226,7 +227,7 @@ scoped_ptr<DrmWindow> ScreenManager::RemoveWindow(
scoped_ptr<DrmWindow> window = window_map_.take_and_erase(widget);
DCHECK(window) << "Attempting to remove non-existing window for " << widget;
UpdateControllerToWindowMapping();
- return window.Pass();
+ return window;
}
DrmWindow* ScreenManager::GetWindow(gfx::AcceleratedWidget widget) {
« no previous file with comments | « ui/ozone/platform/drm/gpu/mock_drm_device.cc ('k') | ui/ozone/platform/drm/gpu/screen_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698