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

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

Issue 1166463004: Revert of Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window.h ('k') | ui/ozone/platform/drm/gpu/gbm_surface.h » ('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 "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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 cursor_location_ = location; 117 cursor_location_ = location;
118 118
119 if (controller_) 119 if (controller_)
120 controller_->MoveCursor(location); 120 controller_->MoveCursor(location);
121 } 121 }
122 122
123 void DrmWindow::QueueOverlayPlane(const OverlayPlane& plane) { 123 void DrmWindow::QueueOverlayPlane(const OverlayPlane& plane) {
124 pending_planes_.push_back(plane); 124 pending_planes_.push_back(plane);
125 } 125 }
126 126
127 bool DrmWindow::SchedulePageFlip(bool is_sync, 127 bool DrmWindow::SchedulePageFlip(bool is_sync, const base::Closure& callback) {
128 const SwapCompletionCallback& callback) {
129 last_submitted_planes_.clear(); 128 last_submitted_planes_.clear();
130 last_submitted_planes_.swap(pending_planes_); 129 last_submitted_planes_.swap(pending_planes_);
131 last_swap_sync_ = is_sync; 130 last_swap_sync_ = is_sync;
132 131
133 if (controller_) { 132 if (controller_) {
134 return controller_->SchedulePageFlip(last_submitted_planes_, is_sync, false, 133 return controller_->SchedulePageFlip(last_submitted_planes_, is_sync, false,
135 callback); 134 callback);
136 } 135 }
137 136
138 callback.Run(gfx::SwapResult::SWAP_ACK); 137 callback.Run();
139 return true; 138 return true;
140 } 139 }
141 140
142 const OverlayPlane* DrmWindow::GetLastModesetBuffer() { 141 const OverlayPlane* DrmWindow::GetLastModesetBuffer() {
143 return OverlayPlane::GetPrimaryPlane(last_submitted_planes_); 142 return OverlayPlane::GetPrimaryPlane(last_submitted_planes_);
144 } 143 }
145 144
146 void DrmWindow::ResetCursor(bool bitmap_only) { 145 void DrmWindow::ResetCursor(bool bitmap_only) {
147 if (!controller_) 146 if (!controller_)
148 return; 147 return;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 if (!cursor_buffers_[i]->Initialize( 204 if (!cursor_buffers_[i]->Initialize(
206 info, false /* should_register_framebuffer */)) { 205 info, false /* should_register_framebuffer */)) {
207 LOG(FATAL) << "Failed to initialize cursor buffer"; 206 LOG(FATAL) << "Failed to initialize cursor buffer";
208 return; 207 return;
209 } 208 }
210 } 209 }
211 } 210 }
212 } 211 }
213 212
214 } // namespace ui 213 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window.h ('k') | ui/ozone/platform/drm/gpu/gbm_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698