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

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

Issue 2623963002: ozone: Allocate scanout buffers according to KMS modifiers. (Closed)
Patch Set: Remove unused modifier_. Created 3 years, 11 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/crtc_controller.h ('k') | ui/ozone/platform/drm/gpu/drm_buffer.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/crtc_controller.h" 5 #include "ui/ozone/platform/drm/gpu/crtc_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "ui/ozone/platform/drm/gpu/drm_device.h" 9 #include "ui/ozone/platform/drm/gpu/drm_device.h"
10 #include "ui/ozone/platform/drm/gpu/page_flip_request.h" 10 #include "ui/ozone/platform/drm/gpu/page_flip_request.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 return true; 114 return true;
115 } 115 }
116 116
117 bool CrtcController::IsFormatSupported(uint32_t fourcc_format, 117 bool CrtcController::IsFormatSupported(uint32_t fourcc_format,
118 uint32_t z_order) const { 118 uint32_t z_order) const {
119 return drm_->plane_manager()->IsFormatSupported(fourcc_format, z_order, 119 return drm_->plane_manager()->IsFormatSupported(fourcc_format, z_order,
120 crtc_); 120 crtc_);
121 } 121 }
122 122
123 std::vector<uint64_t> CrtcController::GetFormatModifiers(uint32_t format) {
124 return drm_->plane_manager()->GetFormatModifiers(crtc_, format);
125 }
126
123 void CrtcController::OnPageFlipEvent(unsigned int frame, 127 void CrtcController::OnPageFlipEvent(unsigned int frame,
124 unsigned int seconds, 128 unsigned int seconds,
125 unsigned int useconds) { 129 unsigned int useconds) {
126 time_of_last_flip_ = 130 time_of_last_flip_ =
127 static_cast<uint64_t>(seconds) * base::Time::kMicrosecondsPerSecond + 131 static_cast<uint64_t>(seconds) * base::Time::kMicrosecondsPerSecond +
128 useconds; 132 useconds;
129 133
130 SignalPageFlipRequest(gfx::SwapResult::SWAP_ACK); 134 SignalPageFlipRequest(gfx::SwapResult::SWAP_ACK);
131 } 135 }
132 136
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 current_planes_.swap(pending_planes_); 170 current_planes_.swap(pending_planes_);
167 171
168 pending_planes_.clear(); 172 pending_planes_.clear();
169 173
170 scoped_refptr<PageFlipRequest> request; 174 scoped_refptr<PageFlipRequest> request;
171 request.swap(page_flip_request_); 175 request.swap(page_flip_request_);
172 request->Signal(result); 176 request->Signal(result);
173 } 177 }
174 178
175 } // namespace ui 179 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/crtc_controller.h ('k') | ui/ozone/platform/drm/gpu/drm_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698