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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_window_unittest.cc

Issue 1426993003: Ozone: Dont hardcode format to YUV when using Overlay Composition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes Created 4 years, 11 months 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_window.cc ('k') | ui/ozone/platform/drm/gpu/gbm_buffer.h » ('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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 buffer_generator_.reset(new ui::MockDumbBufferGenerator()); 93 buffer_generator_.reset(new ui::MockDumbBufferGenerator());
94 screen_manager_.reset(new ui::ScreenManager(buffer_generator_.get())); 94 screen_manager_.reset(new ui::ScreenManager(buffer_generator_.get()));
95 screen_manager_->AddDisplayController(drm_, kDefaultCrtc, kDefaultConnector); 95 screen_manager_->AddDisplayController(drm_, kDefaultCrtc, kDefaultConnector);
96 screen_manager_->ConfigureDisplayController( 96 screen_manager_->ConfigureDisplayController(
97 drm_, kDefaultCrtc, kDefaultConnector, gfx::Point(), kDefaultMode); 97 drm_, kDefaultCrtc, kDefaultConnector, gfx::Point(), kDefaultMode);
98 98
99 drm_device_manager_.reset(new ui::DrmDeviceManager(nullptr)); 99 drm_device_manager_.reset(new ui::DrmDeviceManager(nullptr));
100 100
101 scoped_ptr<ui::DrmWindow> window(new ui::DrmWindow( 101 scoped_ptr<ui::DrmWindow> window(new ui::DrmWindow(
102 kDefaultWidgetHandle, drm_device_manager_.get(), screen_manager_.get())); 102 kDefaultWidgetHandle, drm_device_manager_.get(), screen_manager_.get()));
103 window->Initialize(); 103 window->Initialize(buffer_generator_.get());
104 window->SetBounds( 104 window->SetBounds(
105 gfx::Rect(gfx::Size(kDefaultMode.hdisplay, kDefaultMode.vdisplay))); 105 gfx::Rect(gfx::Size(kDefaultMode.hdisplay, kDefaultMode.vdisplay)));
106 screen_manager_->AddWindow(kDefaultWidgetHandle, std::move(window)); 106 screen_manager_->AddWindow(kDefaultWidgetHandle, std::move(window));
107 } 107 }
108 108
109 void DrmWindowTest::TearDown() { 109 void DrmWindowTest::TearDown() {
110 scoped_ptr<ui::DrmWindow> window = 110 scoped_ptr<ui::DrmWindow> window =
111 screen_manager_->RemoveWindow(kDefaultWidgetHandle); 111 screen_manager_->RemoveWindow(kDefaultWidgetHandle);
112 window->Shutdown(); 112 window->Shutdown();
113 message_loop_.reset(); 113 message_loop_.reset();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 EXPECT_EQ(1, on_swap_buffers_count_); 178 EXPECT_EQ(1, on_swap_buffers_count_);
179 EXPECT_EQ(gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS, 179 EXPECT_EQ(gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS,
180 last_swap_buffers_result_); 180 last_swap_buffers_result_);
181 181
182 window->SchedulePageFlip( 182 window->SchedulePageFlip(
183 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(plane)), 183 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(plane)),
184 base::Bind(&DrmWindowTest::OnSwapBuffers, base::Unretained(this))); 184 base::Bind(&DrmWindowTest::OnSwapBuffers, base::Unretained(this)));
185 EXPECT_EQ(2, on_swap_buffers_count_); 185 EXPECT_EQ(2, on_swap_buffers_count_);
186 EXPECT_EQ(gfx::SwapResult::SWAP_FAILED, last_swap_buffers_result_); 186 EXPECT_EQ(gfx::SwapResult::SWAP_FAILED, last_swap_buffers_result_);
187 } 187 }
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window.cc ('k') | ui/ozone/platform/drm/gpu/gbm_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698