Commit ec93e110 authored by Wenzhao (Colin) Zang's avatar Wenzhao (Colin) Zang Committed by Commit Bot

Revert "viz: Fix wrong uv_rect calculation"

This reverts commit 4bf9d01d.

Reason for revert: crbug.com/900373

Original change's description:
> viz: Fix wrong uv_rect calculation
> 
> CL:1045256 calculates |uv_rect| of the primary plane in wrong way. It causes
> drmModeAtomicAddProperty failure. This CL fixes it.
> 
> BUG=896945
> 
> Change-Id: I6e914707cb961e8294e8ddd160b75e48ae5a2b64
> Reviewed-on: https://chromium-review.googlesource.com/c/1291590
> Commit-Queue: Dongseong Hwang <dongseong.hwang@intel.com>
> Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
> Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
> Reviewed-by: Dongseong Hwang <dongseong.hwang@intel.com>
> Cr-Commit-Position: refs/heads/master@{#601392}

TBR=dongseong.hwang@intel.com,dcastagna@chromium.org,hoegsberg@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 896945, 900373
Change-Id: Ibab22a4fafb7be1ea0921f0cf774b5973d92b0b2
Reviewed-on: https://chromium-review.googlesource.com/c/1318796Reviewed-by: default avatarWenzhao (Colin) Zang <wzang@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605559}
parent 5d0ba2d6
...@@ -285,11 +285,9 @@ void OverlayProcessor::EliminateOrCropPrimary( ...@@ -285,11 +285,9 @@ void OverlayProcessor::EliminateOrCropPrimary(
// Sometimes the content quads extend past primary->display_rect, so first // Sometimes the content quads extend past primary->display_rect, so first
// clip the content_rect to that. // clip the content_rect to that.
content_rect.Intersect(primary->display_rect); content_rect.Intersect(primary->display_rect);
DCHECK_NE(0, primary->display_rect.width()); primary->uv_rect = gfx::ScaleRect(content_rect,
DCHECK_NE(0, primary->display_rect.height()); primary->display_rect.width(),
primary->uv_rect = primary->display_rect.height());
gfx::ScaleRect(content_rect, 1. / primary->display_rect.width(),
1. / primary->display_rect.height());
primary->display_rect = content_rect; primary->display_rect = content_rect;
candidate_list->push_back(*primary); candidate_list->push_back(*primary);
......
...@@ -1913,7 +1913,6 @@ TEST_F(UnderlayTest, PrimaryPlaneOverlayIsTransparentWithUnderlay) { ...@@ -1913,7 +1913,6 @@ TEST_F(UnderlayTest, PrimaryPlaneOverlayIsTransparentWithUnderlay) {
OverlayCandidateList candidate_list; OverlayCandidateList candidate_list;
OverlayCandidate candidate; OverlayCandidate candidate;
candidate.display_rect = gfx::RectF(pass->output_rect);
candidate.use_output_surface_for_resource = true; candidate.use_output_surface_for_resource = true;
candidate.is_opaque = true; candidate.is_opaque = true;
candidate_list.push_back(candidate); candidate_list.push_back(candidate);
...@@ -2212,7 +2211,6 @@ TEST_F(UnderlayCastTest, PrimaryPlaneOverlayIsTransparentWithUnderlay) { ...@@ -2212,7 +2211,6 @@ TEST_F(UnderlayCastTest, PrimaryPlaneOverlayIsTransparentWithUnderlay) {
OverlayCandidateList candidate_list; OverlayCandidateList candidate_list;
OverlayCandidate candidate; OverlayCandidate candidate;
candidate.display_rect = gfx::RectF(pass->output_rect);
candidate.use_output_surface_for_resource = true; candidate.use_output_surface_for_resource = true;
candidate.is_opaque = true; candidate.is_opaque = true;
candidate_list.push_back(candidate); candidate_list.push_back(candidate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment