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 "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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 if (controller_) { | 129 if (controller_) { |
130 return controller_->SchedulePageFlip(last_submitted_planes_, is_sync, false, | 130 return controller_->SchedulePageFlip(last_submitted_planes_, is_sync, false, |
131 callback); | 131 callback); |
132 } | 132 } |
133 | 133 |
134 callback.Run(); | 134 callback.Run(); |
135 return true; | 135 return true; |
136 } | 136 } |
137 | 137 |
| 138 bool DrmWindow::TestPageFlip(const OverlayPlaneList& planes) { |
| 139 return controller_ && |
| 140 controller_->SchedulePageFlip(last_submitted_planes_, true, true, |
| 141 base::Bind(&base::DoNothing)); |
| 142 } |
| 143 |
138 const OverlayPlane* DrmWindow::GetLastModesetBuffer() { | 144 const OverlayPlane* DrmWindow::GetLastModesetBuffer() { |
139 return OverlayPlane::GetPrimaryPlane(last_submitted_planes_); | 145 return OverlayPlane::GetPrimaryPlane(last_submitted_planes_); |
140 } | 146 } |
141 | 147 |
142 void DrmWindow::ResetCursor(bool bitmap_only) { | 148 void DrmWindow::ResetCursor(bool bitmap_only) { |
143 if (!controller_) | 149 if (!controller_) |
144 return; | 150 return; |
145 | 151 |
146 if (cursor_bitmaps_.size()) { | 152 if (cursor_bitmaps_.size()) { |
147 // Draw new cursor into backbuffer. | 153 // Draw new cursor into backbuffer. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 if (!cursor_buffers_[i]->Initialize( | 207 if (!cursor_buffers_[i]->Initialize( |
202 info, false /* should_register_framebuffer */)) { | 208 info, false /* should_register_framebuffer */)) { |
203 LOG(FATAL) << "Failed to initialize cursor buffer"; | 209 LOG(FATAL) << "Failed to initialize cursor buffer"; |
204 return; | 210 return; |
205 } | 211 } |
206 } | 212 } |
207 } | 213 } |
208 } | 214 } |
209 | 215 |
210 } // namespace ui | 216 } // namespace ui |
OLD | NEW |