Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_window.cc

Issue 1420943003: [Ozone-DRM] Fix double call of swap buffers callback on failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/ozone/platform/drm/gpu/drm_window_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/drm/gpu/drm_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698