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

Unified Diff: ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc

Issue 1513283002: Add support to send optimal format as part of ScheduleOverlayPlane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update cmd_buffer_functions Created 5 years 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/gbm_buffer.cc ('k') | ui/ozone/platform/headless/headless_surface_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc
diff --git a/ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc b/ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc
index 1397d7ddd9c9e0b4711b8b4d8b3ea15f11c6c698..f8c7de5166a0960fde1717f5a27d499f0424090e 100644
--- a/ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc
+++ b/ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc
@@ -15,6 +15,8 @@ namespace ui {
namespace {
const size_t kMaxCacheSize = 100;
+// Optimal format for rendering on overlay.
+const gfx::BufferFormat kOverlayRenderFormat = gfx::BufferFormat::UYVY_422;
} // namespace
bool DrmOverlayCandidatesHost::OverlayCompare::operator()(
@@ -81,6 +83,13 @@ void DrmOverlayCandidatesHost::CheckOverlaySupport(
in_use_compatible_params_.find(lookup);
if (last_iter != in_use_compatible_params_.end()) {
candidate.overlay_handled = last_iter->second;
+ // TODO(kalyank): Figure out the optimal render format for overlay. We
+ // should get this from GPU process side. See http://crbug.com/553264.
+ if (candidate.plane_z_order > 0) {
+ candidate.format = kOverlayRenderFormat;
+ candidate.handle_scaling = true;
+ }
+
compatible_candidates++;
if (candidate.overlay_handled)
planes_in_use++;
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer.cc ('k') | ui/ozone/platform/headless/headless_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698