| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "third_party/skia/include/core/SkCanvas.h" | 11 #include "third_party/skia/include/core/SkCanvas.h" |
| 12 #include "ui/gfx/native_pixmap.h" |
| 12 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" | 13 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" |
| 13 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h" | 14 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h" |
| 14 #include "ui/ozone/platform/drm/gpu/mock_drm_device.h" | 15 #include "ui/ozone/platform/drm/gpu/mock_drm_device.h" |
| 15 #include "ui/ozone/platform/drm/gpu/mock_scanout_buffer.h" | 16 #include "ui/ozone/platform/drm/gpu/mock_scanout_buffer.h" |
| 16 #include "ui/ozone/public/native_pixmap.h" | |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Create a basic mode for a 6x4 screen. | 20 // Create a basic mode for a 6x4 screen. |
| 21 const drmModeModeInfo kDefaultMode = | 21 const drmModeModeInfo kDefaultMode = |
| 22 {0, 6, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, {'\0'}}; | 22 {0, 6, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, {'\0'}}; |
| 23 | 23 |
| 24 const uint32_t kPrimaryCrtc = 1; | 24 const uint32_t kPrimaryCrtc = 1; |
| 25 const uint32_t kPrimaryConnector = 2; | 25 const uint32_t kPrimaryConnector = 2; |
| 26 const uint32_t kSecondaryCrtc = 3; | 26 const uint32_t kSecondaryCrtc = 3; |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 planes, base::Bind(&HardwareDisplayControllerTest::PageFlipCallback, | 445 planes, base::Bind(&HardwareDisplayControllerTest::PageFlipCallback, |
| 446 base::Unretained(this))); | 446 base::Unretained(this))); |
| 447 | 447 |
| 448 controller_->RemoveCrtc(drm_, kPrimaryCrtc); | 448 controller_->RemoveCrtc(drm_, kPrimaryCrtc); |
| 449 | 449 |
| 450 EXPECT_EQ(1, page_flips_); | 450 EXPECT_EQ(1, page_flips_); |
| 451 drm_->RunCallbacks(); | 451 drm_->RunCallbacks(); |
| 452 EXPECT_EQ(gfx::SwapResult::SWAP_ACK, last_swap_result_); | 452 EXPECT_EQ(gfx::SwapResult::SWAP_ACK, last_swap_result_); |
| 453 EXPECT_EQ(1, page_flips_); | 453 EXPECT_EQ(1, page_flips_); |
| 454 } | 454 } |
| OLD | NEW |