| 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/drm_window.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_window.h" |
| 6 | 6 |
| 7 #include <drm_fourcc.h> | 7 #include <drm_fourcc.h> |
| 8 | 8 |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 return; | 133 return; |
| 134 } | 134 } |
| 135 | 135 |
| 136 last_submitted_planes_ = planes; | 136 last_submitted_planes_ = planes; |
| 137 | 137 |
| 138 if (!controller_) { | 138 if (!controller_) { |
| 139 callback.Run(gfx::SwapResult::SWAP_ACK); | 139 callback.Run(gfx::SwapResult::SWAP_ACK); |
| 140 return; | 140 return; |
| 141 } | 141 } |
| 142 | 142 |
| 143 if (!controller_->SchedulePageFlip(last_submitted_planes_, | 143 // Controller should call the callback in all cases. |
| 144 false /* test_only */, callback)) { | 144 controller_->SchedulePageFlip(last_submitted_planes_, false /* test_only */, |
| 145 callback.Run(gfx::SwapResult::SWAP_FAILED); | 145 callback); |
| 146 } | |
| 147 } | 146 } |
| 148 | 147 |
| 149 std::vector<OverlayCheck_Params> DrmWindow::TestPageFlip( | 148 std::vector<OverlayCheck_Params> DrmWindow::TestPageFlip( |
| 150 const std::vector<OverlayCheck_Params>& overlays, | 149 const std::vector<OverlayCheck_Params>& overlays, |
| 151 ScanoutBufferGenerator* buffer_generator) { | 150 ScanoutBufferGenerator* buffer_generator) { |
| 152 std::vector<OverlayCheck_Params> params; | 151 std::vector<OverlayCheck_Params> params; |
| 153 if (!controller_) { | 152 if (!controller_) { |
| 154 // Nothing much we can do here. | 153 // Nothing much we can do here. |
| 155 return params; | 154 return params; |
| 156 } | 155 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 if (!cursor_buffers_[i]->Initialize( | 306 if (!cursor_buffers_[i]->Initialize( |
| 308 info, false /* should_register_framebuffer */)) { | 307 info, false /* should_register_framebuffer */)) { |
| 309 LOG(FATAL) << "Failed to initialize cursor buffer"; | 308 LOG(FATAL) << "Failed to initialize cursor buffer"; |
| 310 return; | 309 return; |
| 311 } | 310 } |
| 312 } | 311 } |
| 313 } | 312 } |
| 314 } | 313 } |
| 315 | 314 |
| 316 } // namespace ui | 315 } // namespace ui |
| OLD | NEW |