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

Unified Diff: ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc

Issue 1598573002: Propagate supported scanout formats from driver to SurfaceFactoryOzone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h ('k') | ui/ozone/platform/drm/gpu/drm_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc
index 402d3c04ca725e1f95c5b36a24ee92077e8337b6..6a521c13a76a35d8a957eea72dc98fe4bde6c621 100644
--- a/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc
+++ b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc
@@ -99,6 +99,17 @@ std::vector<DisplaySnapshot_Params> DrmGpuDisplayManager::GetDisplays() {
return params_list;
}
+void DrmGpuDisplayManager::GetScanoutFormats(
+ gfx::AcceleratedWidget widget,
+ std::vector<gfx::BufferFormat>* scanout_formats) {
+ const std::vector<uint32_t>& fourcc_formats =
+ drm_device_manager_->GetDrmDevice(widget)
+ ->plane_manager()
+ ->GetSupportedFormats();
+ for (auto& fourcc : fourcc_formats)
+ scanout_formats->push_back(GetBufferFormatFromFourCCFormat(fourcc));
+}
+
bool DrmGpuDisplayManager::TakeDisplayControl() {
const DrmDeviceVector& devices = drm_device_manager_->GetDrmDevices();
bool status = true;
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h ('k') | ui/ozone/platform/drm/gpu/drm_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698