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..b2e320a5b0365899e1175b86e0fd249901e24fc6 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,10 @@ 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. |
+ if ((fourcc_format == DRM_FORMAT_XRGB8888 || |
+ fourcc_format == DRM_FORMAT_ARGB8888) && |
reveman
2016/07/21 01:45:36
nit: can you add a comment here explaining that AR
Daniele Castagna
2016/07/21 19:39:00
Done.
|
primary_display_bounds == plane.display_bounds) { |
ResetCurrentPlaneList(plane_list); |
hw_plane = primary_plane; |
@@ -278,7 +275,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, |