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

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

Issue 2254103002: ozone: Allow full screen overlay optimization for BGR formats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove "only" in the comment. Created 4 years, 4 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 | « no previous file | no next file » | 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/hardware_display_plane_manager.h" 5 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h"
6 6
7 #include <drm_fourcc.h> 7 #include <drm_fourcc.h>
8 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 to_fixed_point(crop_rect.width()), 259 to_fixed_point(crop_rect.width()),
260 to_fixed_point(crop_rect.height())); 260 to_fixed_point(crop_rect.height()));
261 } 261 }
262 262
263 // If Overlay completely covers primary and isn't transparent, than use 263 // If Overlay completely covers primary and isn't transparent, than use
264 // it as primary. This reduces the no of planes which need to be read in 264 // it as primary. This reduces the no of planes which need to be read in
265 // display controller side. 265 // display controller side.
266 if (primary_plane) { 266 if (primary_plane) {
267 // TODO(dcastagna): Check if we can move this optimization to 267 // TODO(dcastagna): Check if we can move this optimization to
268 // GLRenderer::ScheduleOverlays. 268 // GLRenderer::ScheduleOverlays.
269 // Note that Chromium compositor promotes buffers to overlays (ARGB 269 // Note that Chromium compositor promotes buffers to overlays (ABGR
270 // ones too) only if blending is not needed. 270 // ones too) only if blending is not needed.
271 if ((fourcc_format == DRM_FORMAT_XRGB8888 || 271 // TODO(dcastagna): this should check if the format is the same as
272 // primary_plane->format minus alpha. Changing the format of the primary
273 // plane currently works on rockchip with 3.14 kernel and won't work with
kalyank 2016/08/18 17:23:10 Ideally what we want is if Kernel/hardware can swa
Daniele Castagna 2016/08/18 22:34:34 AFAIK there is no interface from the kernel to kno
274 // newer kernels. Remove this hack as soon as we can switch the primary
275 // plane format to match overlay buffers formats.
276 if ((fourcc_format == DRM_FORMAT_XBGR8888 ||
277 fourcc_format == DRM_FORMAT_ABGR8888 ||
278 fourcc_format == DRM_FORMAT_XRGB8888 ||
272 fourcc_format == DRM_FORMAT_ARGB8888) && 279 fourcc_format == DRM_FORMAT_ARGB8888) &&
273 primary_display_bounds == plane.display_bounds) { 280 primary_display_bounds == plane.display_bounds) {
274 ResetCurrentPlaneList(plane_list); 281 ResetCurrentPlaneList(plane_list);
275 hw_plane = primary_plane; 282 hw_plane = primary_plane;
276 } 283 }
277 } else { 284 } else {
278 primary_plane = hw_plane; 285 primary_plane = hw_plane;
279 primary_display_bounds = plane.display_bounds; 286 primary_display_bounds = plane.display_bounds;
280 } 287 }
281 288
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 break; 331 break;
325 } else { 332 } else {
326 plane_z_order++; 333 plane_z_order++;
327 } 334 }
328 } 335 }
329 336
330 return format_supported; 337 return format_supported;
331 } 338 }
332 339
333 } // namespace ui 340 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698