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

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: Remove obsolete code 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
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 ui::MockDumbBufferGenerator buffer_generator; 167 ui::MockDumbBufferGenerator buffer_generator;
168 ui::DrmWindow* window = screen_manager_->GetWindow(kDefaultWidgetHandle); 168 ui::DrmWindow* window = screen_manager_->GetWindow(kDefaultWidgetHandle);
169 ui::OverlayPlane plane( 169 ui::OverlayPlane plane(
170 buffer_generator.Create(drm_, gfx::BufferFormat::BGRX_8888, window_size)); 170 buffer_generator.Create(drm_, gfx::BufferFormat::BGRX_8888, window_size));
171 171
172 drm_->set_page_flip_expectation(false); 172 drm_->set_page_flip_expectation(false);
173 173
174 // Window was re-sized, so the expectation is to re-create the buffers first. 174 // Window was re-sized, so the expectation is to re-create the buffers first.
175 window->SchedulePageFlip( 175 window->SchedulePageFlip(
176 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(plane)), 176 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(plane)),
177 base::Bind(&DrmWindowTest::OnSwapBuffers, base::Unretained(this))); 177 base::Bind(&DrmWindowTest::OnSwapBuffers, base::Unretained(this)),
178 buffer_generator_.get());
178 EXPECT_EQ(1, on_swap_buffers_count_); 179 EXPECT_EQ(1, on_swap_buffers_count_);
179 EXPECT_EQ(gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS, 180 EXPECT_EQ(gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS,
180 last_swap_buffers_result_); 181 last_swap_buffers_result_);
181 182
182 window->SchedulePageFlip( 183 window->SchedulePageFlip(
183 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(plane)), 184 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(plane)),
184 base::Bind(&DrmWindowTest::OnSwapBuffers, base::Unretained(this))); 185 base::Bind(&DrmWindowTest::OnSwapBuffers, base::Unretained(this)),
186 buffer_generator_.get());
185 EXPECT_EQ(2, on_swap_buffers_count_); 187 EXPECT_EQ(2, on_swap_buffers_count_);
186 EXPECT_EQ(gfx::SwapResult::SWAP_FAILED, last_swap_buffers_result_); 188 EXPECT_EQ(gfx::SwapResult::SWAP_FAILED, last_swap_buffers_result_);
187 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698