Chromium Code Reviews| Index: ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc |
| diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc |
| index 6bac1893128b35c01fe0dfa2b359b0e8096ead0f..3f6f864f34c19a20208f998a58ce3a418d6ce318 100644 |
| --- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc |
| +++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc |
| @@ -266,9 +266,16 @@ bool HardwareDisplayPlaneManager::AssignOverlayPlanes( |
| if (primary_plane) { |
| // TODO(dcastagna): Check if we can move this optimization to |
| // GLRenderer::ScheduleOverlays. |
| - // Note that Chromium compositor promotes buffers to overlays (ARGB |
| + // Note that Chromium compositor promotes buffers to overlays (ABGR |
| // ones too) only if blending is not needed. |
| - if ((fourcc_format == DRM_FORMAT_XRGB8888 || |
| + // TODO(dcastagna): this should check if the format is the same as |
| + // primary_plane->format minus alpha. Changing the format of the primary |
| + // 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
|
| + // newer kernels. Remove this hack as soon as we can switch the primary |
| + // plane format to match overlay buffers formats. |
| + if ((fourcc_format == DRM_FORMAT_XBGR8888 || |
| + fourcc_format == DRM_FORMAT_ABGR8888 || |
| + fourcc_format == DRM_FORMAT_XRGB8888 || |
| fourcc_format == DRM_FORMAT_ARGB8888) && |
| primary_display_bounds == plane.display_bounds) { |
| ResetCurrentPlaneList(plane_list); |