| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 return; | 146 return; |
| 147 } | 147 } |
| 148 | 148 |
| 149 last_submitted_planes_ = planes; | 149 last_submitted_planes_ = planes; |
| 150 | 150 |
| 151 if (!controller_) { | 151 if (!controller_) { |
| 152 callback.Run(gfx::SwapResult::SWAP_ACK); | 152 callback.Run(gfx::SwapResult::SWAP_ACK); |
| 153 return; | 153 return; |
| 154 } | 154 } |
| 155 | 155 |
| 156 if (!controller_->SchedulePageFlip(last_submitted_planes_, | 156 // Controller should call the callback in all cases. |
| 157 false /* test_only */, callback)) { | 157 controller_->SchedulePageFlip(last_submitted_planes_, false /* test_only */, |
| 158 callback.Run(gfx::SwapResult::SWAP_FAILED); | 158 callback); |
| 159 } | |
| 160 } | 159 } |
| 161 | 160 |
| 162 std::vector<OverlayCheck_Params> DrmWindow::TestPageFlip( | 161 std::vector<OverlayCheck_Params> DrmWindow::TestPageFlip( |
| 163 const std::vector<OverlayCheck_Params>& overlays, | 162 const std::vector<OverlayCheck_Params>& overlays, |
| 164 ScanoutBufferGenerator* buffer_generator) { | 163 ScanoutBufferGenerator* buffer_generator) { |
| 165 std::vector<OverlayCheck_Params> params; | 164 std::vector<OverlayCheck_Params> params; |
| 166 if (!controller_) { | 165 if (!controller_) { |
| 167 // Nothing much we can do here. | 166 // Nothing much we can do here. |
| 168 return params; | 167 return params; |
| 169 } | 168 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 if (!cursor_buffers_[i]->Initialize( | 319 if (!cursor_buffers_[i]->Initialize( |
| 321 info, false /* should_register_framebuffer */)) { | 320 info, false /* should_register_framebuffer */)) { |
| 322 LOG(FATAL) << "Failed to initialize cursor buffer"; | 321 LOG(FATAL) << "Failed to initialize cursor buffer"; |
| 323 return; | 322 return; |
| 324 } | 323 } |
| 325 } | 324 } |
| 326 } | 325 } |
| 327 } | 326 } |
| 328 | 327 |
| 329 } // namespace ui | 328 } // namespace ui |
| OLD | NEW |