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

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

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 7 months 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
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 "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "third_party/skia/include/core/SkDevice.h" 9 #include "third_party/skia/include/core/SkDevice.h"
10 #include "third_party/skia/include/core/SkSurface.h" 10 #include "third_party/skia/include/core/SkSurface.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 cursor_location_ = location; 114 cursor_location_ = location;
115 115
116 if (controller_) 116 if (controller_)
117 controller_->MoveCursor(location); 117 controller_->MoveCursor(location);
118 } 118 }
119 119
120 void DrmWindow::QueueOverlayPlane(const OverlayPlane& plane) { 120 void DrmWindow::QueueOverlayPlane(const OverlayPlane& plane) {
121 pending_planes_.push_back(plane); 121 pending_planes_.push_back(plane);
122 } 122 }
123 123
124 bool DrmWindow::SchedulePageFlip(bool is_sync, const base::Closure& callback) { 124 bool DrmWindow::SchedulePageFlip(bool is_sync,
125 const SwapCompletionCallback& callback) {
125 last_submitted_planes_.clear(); 126 last_submitted_planes_.clear();
126 last_submitted_planes_.swap(pending_planes_); 127 last_submitted_planes_.swap(pending_planes_);
127 last_swap_sync_ = is_sync; 128 last_swap_sync_ = is_sync;
128 129
129 if (controller_) { 130 if (controller_) {
130 return controller_->SchedulePageFlip(last_submitted_planes_, is_sync, 131 return controller_->SchedulePageFlip(last_submitted_planes_, is_sync,
131 callback); 132 callback);
132 } 133 }
133 134
134 callback.Run(); 135 callback.Run(gfx::SwapAck);
135 return true; 136 return true;
136 } 137 }
137 138
138 const OverlayPlane* DrmWindow::GetLastModesetBuffer() { 139 const OverlayPlane* DrmWindow::GetLastModesetBuffer() {
139 return OverlayPlane::GetPrimaryPlane(last_submitted_planes_); 140 return OverlayPlane::GetPrimaryPlane(last_submitted_planes_);
140 } 141 }
141 142
142 void DrmWindow::ResetCursor(bool bitmap_only) { 143 void DrmWindow::ResetCursor(bool bitmap_only) {
143 if (!controller_) 144 if (!controller_)
144 return; 145 return;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (!cursor_buffers_[i]->Initialize( 202 if (!cursor_buffers_[i]->Initialize(
202 info, false /* should_register_framebuffer */)) { 203 info, false /* should_register_framebuffer */)) {
203 LOG(FATAL) << "Failed to initialize cursor buffer"; 204 LOG(FATAL) << "Failed to initialize cursor buffer";
204 return; 205 return;
205 } 206 }
206 } 207 }
207 } 208 }
208 } 209 }
209 210
210 } // namespace ui 211 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698