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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_window_unittest.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/drm_thread.cc ('k') | ui/ozone/platform/drm/gpu/gbm_buffer.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 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 <utility>
5 #include <vector> 6 #include <vector>
6 7
7 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/skia/include/core/SkCanvas.h" 11 #include "third_party/skia/include/core/SkCanvas.h"
11 #include "third_party/skia/include/core/SkColor.h" 12 #include "third_party/skia/include/core/SkColor.h"
12 #include "third_party/skia/include/core/SkImageInfo.h" 13 #include "third_party/skia/include/core/SkImageInfo.h"
13 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" 14 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h"
14 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" 15 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 screen_manager_->ConfigureDisplayController( 93 screen_manager_->ConfigureDisplayController(
93 drm_, kDefaultCrtc, kDefaultConnector, gfx::Point(), kDefaultMode); 94 drm_, kDefaultCrtc, kDefaultConnector, gfx::Point(), kDefaultMode);
94 95
95 drm_device_manager_.reset(new ui::DrmDeviceManager(nullptr)); 96 drm_device_manager_.reset(new ui::DrmDeviceManager(nullptr));
96 97
97 scoped_ptr<ui::DrmWindow> window(new ui::DrmWindow( 98 scoped_ptr<ui::DrmWindow> window(new ui::DrmWindow(
98 kDefaultWidgetHandle, drm_device_manager_.get(), screen_manager_.get())); 99 kDefaultWidgetHandle, drm_device_manager_.get(), screen_manager_.get()));
99 window->Initialize(); 100 window->Initialize();
100 window->SetBounds( 101 window->SetBounds(
101 gfx::Rect(gfx::Size(kDefaultMode.hdisplay, kDefaultMode.vdisplay))); 102 gfx::Rect(gfx::Size(kDefaultMode.hdisplay, kDefaultMode.vdisplay)));
102 screen_manager_->AddWindow(kDefaultWidgetHandle, window.Pass()); 103 screen_manager_->AddWindow(kDefaultWidgetHandle, std::move(window));
103 } 104 }
104 105
105 void DrmWindowTest::TearDown() { 106 void DrmWindowTest::TearDown() {
106 scoped_ptr<ui::DrmWindow> window = 107 scoped_ptr<ui::DrmWindow> window =
107 screen_manager_->RemoveWindow(kDefaultWidgetHandle); 108 screen_manager_->RemoveWindow(kDefaultWidgetHandle);
108 window->Shutdown(); 109 window->Shutdown();
109 message_loop_.reset(); 110 message_loop_.reset();
110 } 111 }
111 112
112 TEST_F(DrmWindowTest, SetCursorImage) { 113 TEST_F(DrmWindowTest, SetCursorImage) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 EXPECT_EQ(1, on_swap_buffers_count_); 175 EXPECT_EQ(1, on_swap_buffers_count_);
175 EXPECT_EQ(gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS, 176 EXPECT_EQ(gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS,
176 last_swap_buffers_result_); 177 last_swap_buffers_result_);
177 178
178 window->SchedulePageFlip( 179 window->SchedulePageFlip(
179 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(plane)), 180 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(plane)),
180 base::Bind(&DrmWindowTest::OnSwapBuffers, base::Unretained(this))); 181 base::Bind(&DrmWindowTest::OnSwapBuffers, base::Unretained(this)));
181 EXPECT_EQ(2, on_swap_buffers_count_); 182 EXPECT_EQ(2, on_swap_buffers_count_);
182 EXPECT_EQ(gfx::SwapResult::SWAP_FAILED, last_swap_buffers_result_); 183 EXPECT_EQ(gfx::SwapResult::SWAP_FAILED, last_swap_buffers_result_);
183 } 184 }
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread.cc ('k') | ui/ozone/platform/drm/gpu/gbm_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698