| OLD | NEW |
| 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" | 6 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" |
| 7 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" | 7 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" |
| 8 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" | 8 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" |
| 9 #include "ui/ozone/platform/drm/gpu/drm_window.h" | 9 #include "ui/ozone/platform/drm/gpu/drm_window.h" |
| 10 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h" | 10 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 kSecondaryMode.clock++; | 218 kSecondaryMode.clock++; |
| 219 | 219 |
| 220 screen_manager_->AddDisplayController(drm_, kSecondaryCrtc, | 220 screen_manager_->AddDisplayController(drm_, kSecondaryCrtc, |
| 221 kSecondaryConnector); | 221 kSecondaryConnector); |
| 222 screen_manager_->ConfigureDisplayController( | 222 screen_manager_->ConfigureDisplayController( |
| 223 drm_, kSecondaryCrtc, kSecondaryConnector, GetPrimaryBounds().origin(), | 223 drm_, kSecondaryCrtc, kSecondaryConnector, GetPrimaryBounds().origin(), |
| 224 kSecondaryMode); | 224 kSecondaryMode); |
| 225 | 225 |
| 226 ui::HardwareDisplayController* controller = | 226 ui::HardwareDisplayController* controller = |
| 227 screen_manager_->GetDisplayController(GetPrimaryBounds()); | 227 screen_manager_->GetDisplayController(GetPrimaryBounds()); |
| 228 for (ui::CrtcController* crtc : controller->crtc_controllers()) { | 228 for (const auto& crtc : controller->crtc_controllers()) { |
| 229 if (crtc->crtc() == kPrimaryCrtc) | 229 if (crtc->crtc() == kPrimaryCrtc) |
| 230 EXPECT_EQ(kDefaultMode.clock, crtc->mode().clock); | 230 EXPECT_EQ(kDefaultMode.clock, crtc->mode().clock); |
| 231 else if (crtc->crtc() == kSecondaryCrtc) | 231 else if (crtc->crtc() == kSecondaryCrtc) |
| 232 EXPECT_EQ(kSecondaryMode.clock, crtc->mode().clock); | 232 EXPECT_EQ(kSecondaryMode.clock, crtc->mode().clock); |
| 233 else | 233 else |
| 234 NOTREACHED(); | 234 NOTREACHED(); |
| 235 } | 235 } |
| 236 } | 236 } |
| 237 | 237 |
| 238 TEST_F(ScreenManagerTest, MonitorGoneInMirrorMode) { | 238 TEST_F(ScreenManagerTest, MonitorGoneInMirrorMode) { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 screen_manager_->AddDisplayController(drm_, kPrimaryCrtc, kPrimaryConnector); | 502 screen_manager_->AddDisplayController(drm_, kPrimaryCrtc, kPrimaryConnector); |
| 503 screen_manager_->ConfigureDisplayController( | 503 screen_manager_->ConfigureDisplayController( |
| 504 drm_, kPrimaryCrtc, kPrimaryConnector, GetPrimaryBounds().origin(), | 504 drm_, kPrimaryCrtc, kPrimaryConnector, GetPrimaryBounds().origin(), |
| 505 kDefaultMode); | 505 kDefaultMode); |
| 506 | 506 |
| 507 EXPECT_EQ(buffer->GetFramebufferId(), drm_->current_framebuffer()); | 507 EXPECT_EQ(buffer->GetFramebufferId(), drm_->current_framebuffer()); |
| 508 | 508 |
| 509 window = screen_manager_->RemoveWindow(1); | 509 window = screen_manager_->RemoveWindow(1); |
| 510 window->Shutdown(); | 510 window->Shutdown(); |
| 511 } | 511 } |
| OLD | NEW |