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

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

Issue 1438343002: Remove deprecated ScopedVector usage from ui/ozone and ui/events/ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove HDCI stuff Created 5 years, 1 month 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 <drm_fourcc.h> 5 #include <drm_fourcc.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 for (size_t i = 0; i < count; i++) { 63 for (size_t i = 0; i < count; i++) {
64 scoped_ptr<ui::HardwareDisplayPlane> plane(new ui::HardwareDisplayPlane( 64 scoped_ptr<ui::HardwareDisplayPlane> plane(new ui::HardwareDisplayPlane(
65 planes[i].id, planes[i].allowed_crtc_mask)); 65 planes[i].id, planes[i].allowed_crtc_mask));
66 // Add support to test more formats. 66 // Add support to test more formats.
67 plane->Initialize(drm_, std::vector<uint32_t>(1, DRM_FORMAT_XRGB8888), 67 plane->Initialize(drm_, std::vector<uint32_t>(1, DRM_FORMAT_XRGB8888),
68 false, true); 68 false, true);
69 planes_.push_back(plane.Pass()); 69 planes_.push_back(plane.Pass());
70 } 70 }
71 // The real HDPM uses sorted planes, so sort them for consistency. 71 // The real HDPM uses sorted planes, so sort them for consistency.
72 std::sort(planes_.begin(), planes_.end(), 72 std::sort(planes_.begin(), planes_.end(),
73 [](ui::HardwareDisplayPlane* l, ui::HardwareDisplayPlane* r) { 73 [](const scoped_ptr<ui::HardwareDisplayPlane>& l,
74 const scoped_ptr<ui::HardwareDisplayPlane>& r) {
74 return l->plane_id() < r->plane_id(); 75 return l->plane_id() < r->plane_id();
75 }); 76 });
76 } 77 }
77 78
78 bool Commit(ui::HardwareDisplayPlaneList* plane_list, 79 bool Commit(ui::HardwareDisplayPlaneList* plane_list,
79 bool test_only) override { 80 bool test_only) override {
80 return false; 81 return false;
81 } 82 }
82 83
83 bool SetPlaneData(ui::HardwareDisplayPlaneList* plane_list, 84 bool SetPlaneData(ui::HardwareDisplayPlaneList* plane_list,
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 assigns.push_back(ui::OverlayPlane(primary_buffer)); 292 assigns.push_back(ui::OverlayPlane(primary_buffer));
292 drm->plane_manager()->BeginFrame(&hdpl); 293 drm->plane_manager()->BeginFrame(&hdpl);
293 EXPECT_TRUE(drm->plane_manager()->AssignOverlayPlanes(&hdpl, assigns, 294 EXPECT_TRUE(drm->plane_manager()->AssignOverlayPlanes(&hdpl, assigns,
294 crtcs[0], &crtc)); 295 crtcs[0], &crtc));
295 EXPECT_EQ(0, drm->get_overlay_clear_call_count()); 296 EXPECT_EQ(0, drm->get_overlay_clear_call_count());
296 EXPECT_TRUE(drm->plane_manager()->Commit(&hdpl, false)); 297 EXPECT_TRUE(drm->plane_manager()->Commit(&hdpl, false));
297 EXPECT_EQ(1, drm->get_overlay_clear_call_count()); 298 EXPECT_EQ(1, drm->get_overlay_clear_call_count());
298 } 299 }
299 300
300 } // namespace 301 } // namespace
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc ('k') | ui/ozone/platform/drm/gpu/screen_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698