| 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 "ui/ozone/platform/drm/gpu/crtc_controller.h" | 5 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "ui/ozone/platform/drm/gpu/drm_device.h" | 9 #include "ui/ozone/platform/drm/gpu/drm_device.h" |
| 10 #include "ui/ozone/platform/drm/gpu/page_flip_request.h" | 10 #include "ui/ozone/platform/drm/gpu/page_flip_request.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 } | 112 } |
| 113 | 113 |
| 114 return true; | 114 return true; |
| 115 } | 115 } |
| 116 | 116 |
| 117 std::vector<uint32_t> CrtcController::GetCompatibleHardwarePlaneIds( | 117 std::vector<uint32_t> CrtcController::GetCompatibleHardwarePlaneIds( |
| 118 const OverlayPlane& plane) const { | 118 const OverlayPlane& plane) const { |
| 119 return drm_->plane_manager()->GetCompatibleHardwarePlaneIds(plane, crtc_); | 119 return drm_->plane_manager()->GetCompatibleHardwarePlaneIds(plane, crtc_); |
| 120 } | 120 } |
| 121 | 121 |
| 122 bool CrtcController::IsFormatSupported(uint32_t fourcc_format, |
| 123 uint32_t z_order) const { |
| 124 return drm_->plane_manager()->IsFormatSupported(fourcc_format, z_order, |
| 125 crtc_); |
| 126 } |
| 127 |
| 122 void CrtcController::OnPageFlipEvent(unsigned int frame, | 128 void CrtcController::OnPageFlipEvent(unsigned int frame, |
| 123 unsigned int seconds, | 129 unsigned int seconds, |
| 124 unsigned int useconds) { | 130 unsigned int useconds) { |
| 125 time_of_last_flip_ = | 131 time_of_last_flip_ = |
| 126 static_cast<uint64_t>(seconds) * base::Time::kMicrosecondsPerSecond + | 132 static_cast<uint64_t>(seconds) * base::Time::kMicrosecondsPerSecond + |
| 127 useconds; | 133 useconds; |
| 128 | 134 |
| 129 SignalPageFlipRequest(gfx::SwapResult::SWAP_ACK); | 135 SignalPageFlipRequest(gfx::SwapResult::SWAP_ACK); |
| 130 } | 136 } |
| 131 | 137 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 current_planes_.swap(pending_planes_); | 171 current_planes_.swap(pending_planes_); |
| 166 | 172 |
| 167 pending_planes_.clear(); | 173 pending_planes_.clear(); |
| 168 | 174 |
| 169 scoped_refptr<PageFlipRequest> request; | 175 scoped_refptr<PageFlipRequest> request; |
| 170 request.swap(page_flip_request_); | 176 request.swap(page_flip_request_); |
| 171 request->Signal(result); | 177 request->Signal(result); |
| 172 } | 178 } |
| 173 | 179 |
| 174 } // namespace ui | 180 } // namespace ui |
| OLD | NEW |