| 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 90147a893d8a2d83e4a56cf436956a6f0557a392..f972fa4bc4ade00c81aa5963a0dd0283f2fa8c82 100644
|
| --- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
|
| +++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
|
| @@ -234,7 +234,6 @@ bool HardwareDisplayPlaneManager::AssignOverlayPlanes(
|
| size_t plane_idx = 0;
|
| HardwareDisplayPlane* primary_plane = nullptr;
|
| gfx::Rect primary_display_bounds;
|
| - uint32_t primary_format;
|
| for (const auto& plane : overlay_list) {
|
| HardwareDisplayPlane* hw_plane =
|
| FindNextUnusedPlane(&plane_idx, crtc_index, plane);
|
| @@ -265,12 +264,12 @@ bool HardwareDisplayPlaneManager::AssignOverlayPlanes(
|
| // it as primary. This reduces the no of planes which need to be read in
|
| // display controller side.
|
| if (primary_plane) {
|
| - bool needs_blending = true;
|
| - if (fourcc_format == DRM_FORMAT_XRGB8888)
|
| - needs_blending = false;
|
| - // TODO(kalyank): Check if we can move this optimization to
|
| - // DrmOverlayCandidatesHost.
|
| - if (!needs_blending && primary_format == fourcc_format &&
|
| + // TODO(dcastagna): Check if we can move this optimization to
|
| + // GLRenderer::ScheduleOverlays.
|
| + // Note that Chromium compositor promotes buffers to overlays (ARGB
|
| + // ones too) only if blending is not needed.
|
| + if ((fourcc_format == DRM_FORMAT_XRGB8888 ||
|
| + fourcc_format == DRM_FORMAT_ARGB8888) &&
|
| primary_display_bounds == plane.display_bounds) {
|
| ResetCurrentPlaneList(plane_list);
|
| hw_plane = primary_plane;
|
| @@ -278,7 +277,6 @@ bool HardwareDisplayPlaneManager::AssignOverlayPlanes(
|
| } else {
|
| primary_plane = hw_plane;
|
| primary_display_bounds = plane.display_bounds;
|
| - primary_format = fourcc_format;
|
| }
|
|
|
| if (!SetPlaneData(plane_list, hw_plane, plane, crtc_id, fixed_point_rect,
|
|
|