| 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 3f6f864f34c19a20208f998a58ce3a418d6ce318..61c7c47afc9e74e58829a4585cfcf5e609839928 100644
|
| --- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
|
| +++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
|
| @@ -232,8 +232,6 @@ bool HardwareDisplayPlaneManager::AssignOverlayPlanes(
|
| }
|
|
|
| size_t plane_idx = 0;
|
| - HardwareDisplayPlane* primary_plane = nullptr;
|
| - gfx::Rect primary_display_bounds;
|
| for (const auto& plane : overlay_list) {
|
| HardwareDisplayPlane* hw_plane =
|
| FindNextUnusedPlane(&plane_idx, crtc_index, plane);
|
| @@ -244,7 +242,6 @@ bool HardwareDisplayPlaneManager::AssignOverlayPlanes(
|
| }
|
|
|
| gfx::Rect fixed_point_rect;
|
| - uint32_t fourcc_format = plane.buffer->GetFramebufferPixelFormat();
|
| if (hw_plane->type() != HardwareDisplayPlane::kDummy) {
|
| const gfx::Size& size = plane.buffer->GetSize();
|
| gfx::RectF crop_rect = plane.crop_rect;
|
| @@ -260,32 +257,6 @@ bool HardwareDisplayPlaneManager::AssignOverlayPlanes(
|
| to_fixed_point(crop_rect.height()));
|
| }
|
|
|
| - // If Overlay completely covers primary and isn't transparent, than use
|
| - // it as primary. This reduces the no of planes which need to be read in
|
| - // display controller side.
|
| - if (primary_plane) {
|
| - // TODO(dcastagna): Check if we can move this optimization to
|
| - // GLRenderer::ScheduleOverlays.
|
| - // Note that Chromium compositor promotes buffers to overlays (ABGR
|
| - // ones too) only if blending is not needed.
|
| - // 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
|
| - // 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);
|
| - hw_plane = primary_plane;
|
| - }
|
| - } else {
|
| - primary_plane = hw_plane;
|
| - primary_display_bounds = plane.display_bounds;
|
| - }
|
| -
|
| if (!SetPlaneData(plane_list, hw_plane, plane, crtc_id, fixed_point_rect,
|
| crtc)) {
|
| ResetCurrentPlaneList(plane_list);
|
|
|