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

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

Issue 1426993003: Ozone: Dont hardcode format to YUV when using Overlay Composition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cosmetic fixes 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
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/hardware_display_controller.h" 5 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h"
6 6
7 #include <drm.h> 7 #include <drm.h>
8 #include <string.h> 8 #include <string.h>
9 #include <xf86drm.h> 9 #include <xf86drm.h>
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // plane. 149 // plane.
150 if (crtc_controllers_[i]->GetCompatibleHardwarePlaneIds(plane).empty()) 150 if (crtc_controllers_[i]->GetCompatibleHardwarePlaneIds(plane).empty())
151 return std::vector<uint32_t>(); 151 return std::vector<uint32_t>();
152 } 152 }
153 153
154 // TODO(kalyank): We Should ensure that this list doesn't contain any planes 154 // TODO(kalyank): We Should ensure that this list doesn't contain any planes
155 // which mirrored displays share with primary. 155 // which mirrored displays share with primary.
156 return plane_ids; 156 return plane_ids;
157 } 157 }
158 158
159 bool HardwareDisplayController::IsFormatSupported(uint32_t fourcc_format,
160 uint32_t z_order) const {
161 for (size_t i = 0; i < crtc_controllers_.size(); ++i) {
162 // Make sure all displays have overlays to support this plane.
163 if (!crtc_controllers_[i]->IsFormatSupported(fourcc_format, z_order))
164 return false;
165 }
166
167 return true;
168 }
169
159 bool HardwareDisplayController::SetCursor( 170 bool HardwareDisplayController::SetCursor(
160 const scoped_refptr<ScanoutBuffer>& buffer) { 171 const scoped_refptr<ScanoutBuffer>& buffer) {
161 bool status = true; 172 bool status = true;
162 173
163 if (is_disabled_) 174 if (is_disabled_)
164 return true; 175 return true;
165 176
166 for (size_t i = 0; i < crtc_controllers_.size(); ++i) 177 for (size_t i = 0; i < crtc_controllers_.size(); ++i)
167 status &= crtc_controllers_[i]->SetCursor(buffer); 178 status &= crtc_controllers_[i]->SetCursor(buffer);
168 179
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 291
281 scoped_refptr<DrmDevice> HardwareDisplayController::GetAllocationDrmDevice() 292 scoped_refptr<DrmDevice> HardwareDisplayController::GetAllocationDrmDevice()
282 const { 293 const {
283 DCHECK(!crtc_controllers_.empty()); 294 DCHECK(!crtc_controllers_.empty());
284 // TODO(dnicoara) When we support mirroring across DRM devices, figure out 295 // TODO(dnicoara) When we support mirroring across DRM devices, figure out
285 // which device should be used for allocations. 296 // which device should be used for allocations.
286 return crtc_controllers_[0]->drm(); 297 return crtc_controllers_[0]->drm();
287 } 298 }
288 299
289 } // namespace ui 300 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698