Commit 81bcb075 authored by Saman Sami's avatar Saman Sami Committed by Commit Bot

Revert "Handle 4CC format for opaque fb when TestPageFlip"

This CL reverts https://crrev.com/c/1724558 which has increased the
number of crashes in SchedulePageFlip.

TBR=sammc@chromium.org

Bug: 1006847
Change-Id: Ib1edf3d16f4a0f9141f37e5bd76f8ba969c7b9fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841663
Commit-Queue: Saman Sami <samans@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703718}
parent 68b5022c
......@@ -29,7 +29,6 @@ void ConvertToOzoneOverlaySurface(
ozone_candidate->crop_rect = gfx::RectF(0.f, 0.f, 1.f, 1.f);
ozone_candidate->clip_rect = gfx::ToEnclosingRect(primary_plane.display_rect);
ozone_candidate->is_clipped = false;
ozone_candidate->is_opaque = !primary_plane.enable_blending;
ozone_candidate->plane_z_order = 0;
ozone_candidate->buffer_size = primary_plane.resource_size;
}
......@@ -43,7 +42,6 @@ void ConvertToOzoneOverlaySurface(
ozone_candidate->crop_rect = overlay_candidate.uv_rect;
ozone_candidate->clip_rect = overlay_candidate.clip_rect;
ozone_candidate->is_clipped = overlay_candidate.is_clipped;
ozone_candidate->is_opaque = overlay_candidate.is_opaque;
ozone_candidate->plane_z_order = overlay_candidate.plane_z_order;
ozone_candidate->buffer_size = overlay_candidate.resource_size_in_pixels;
}
......
......@@ -31,7 +31,6 @@ OverlayCheck_Params::OverlayCheck_Params(
format(candidate.format),
display_rect(gfx::ToNearestRect(candidate.display_rect)),
crop_rect(candidate.crop_rect),
is_opaque(candidate.is_opaque),
plane_z_order(candidate.plane_z_order),
is_overlay_candidate(candidate.overlay_handled) {}
......
......@@ -73,7 +73,6 @@ struct OverlayCheck_Params {
gfx::BufferFormat format = gfx::BufferFormat::BGRA_8888;
gfx::Rect display_rect;
gfx::RectF crop_rect;
bool is_opaque = false;
int plane_z_order = 0;
// By default we mark this configuration valid for promoting it to an overlay.
bool is_overlay_candidate = true;
......
......@@ -86,7 +86,6 @@ IPC_STRUCT_TRAITS_BEGIN(ui::OverlayCheck_Params)
IPC_STRUCT_TRAITS_MEMBER(format)
IPC_STRUCT_TRAITS_MEMBER(display_rect)
IPC_STRUCT_TRAITS_MEMBER(crop_rect)
IPC_STRUCT_TRAITS_MEMBER(is_opaque)
IPC_STRUCT_TRAITS_MEMBER(plane_z_order)
IPC_STRUCT_TRAITS_MEMBER(is_overlay_candidate)
IPC_STRUCT_TRAITS_END()
......
......@@ -10,7 +10,6 @@
#include <sys/mman.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <algorithm>
#include <memory>
#include <utility>
......@@ -609,7 +608,6 @@ OverlaySurfaceCandidateList CreateOverlaySurfaceCandidateListFrom(
osc.format = p.format;
osc.display_rect = gfx::RectF(p.display_rect);
osc.crop_rect = p.crop_rect;
osc.is_opaque = p.is_opaque;
osc.plane_z_order = p.plane_z_order;
osc.overlay_handled = p.is_overlay_candidate;
candidates.push_back(osc);
......
......@@ -5,7 +5,6 @@
#include "ui/ozone/platform/drm/gpu/drm_overlay_validator.h"
#include <drm_fourcc.h>
#include <memory>
#include <utility>
......@@ -86,10 +85,7 @@ std::vector<OverlayCheckReturn_Params> DrmOverlayValidator::TestPageFlip(
scoped_refptr<DrmFramebuffer> buffer = GetBufferForPageFlipTest(
drm, params[i].buffer_size,
params[i].is_opaque
? GetFourCCFormatForOpaqueFramebuffer(params[i].format)
: GetFourCCFormatFromBufferFormat(params[i].format),
&reusable_buffers);
GetFourCCFormatFromBufferFormat(params[i].format), &reusable_buffers);
DrmOverlayPlane plane(buffer, params[i].plane_z_order, params[i].transform,
params[i].display_rect, params[i].crop_rect,
......
......@@ -144,7 +144,6 @@ void DrmOverlayValidatorTest::SetUp() {
ui::OverlayCheck_Params primary_candidate;
primary_candidate.buffer_size = primary_rect_.size();
primary_candidate.display_rect = primary_rect_;
primary_candidate.is_opaque = true;
primary_candidate.format = gfx::BufferFormat::BGRX_8888;
overlay_params_.push_back(primary_candidate);
AddPlane(primary_candidate);
......@@ -153,7 +152,6 @@ void DrmOverlayValidatorTest::SetUp() {
overlay_candidate.buffer_size = overlay_rect_.size();
overlay_candidate.display_rect = overlay_rect_;
overlay_candidate.plane_z_order = 1;
primary_candidate.is_opaque = true;
overlay_candidate.format = gfx::BufferFormat::BGRX_8888;
overlay_params_.push_back(overlay_candidate);
AddPlane(overlay_candidate);
......@@ -227,7 +225,7 @@ void DrmOverlayValidatorTest::AddPlane(const ui::OverlayCheck_Params& params) {
ui::GetFourCCFormatFromBufferFormat(params.format), params.buffer_size);
plane_list_.push_back(ui::DrmOverlayPlane(
std::move(drm_framebuffer), params.plane_z_order, params.transform,
params.display_rect, params.crop_rect, !params.is_opaque, nullptr));
params.display_rect, params.crop_rect, true, nullptr));
}
void DrmOverlayValidatorTest::TearDown() {
......@@ -304,7 +302,6 @@ TEST_F(DrmOverlayValidatorTest, OverlayFormat_YUV) {
overlay_params_.back().buffer_size = overlay_rect_.size();
overlay_params_.back().display_rect = overlay_rect_;
overlay_params_.back().crop_rect = crop_rect;
overlay_params_.back().is_opaque = false;
overlay_params_.back().format = gfx::BufferFormat::YUV_420_BIPLANAR;
plane_list_.pop_back();
AddPlane(overlay_params_.back());
......
......@@ -32,8 +32,6 @@ struct OverlaySurfaceCandidate {
gfx.mojom.Rect clip_rect;
// If the quad is clipped after composition.
bool is_clipped;
// If the quad doesn't require blending.
bool is_opaque;
// Stacking order of the overlay plane relative to the main surface,
// which is 0. Signed to allow for "underlays".
int32 plane_z_order = 0;
......
......@@ -80,10 +80,6 @@ struct StructTraits<ui::ozone::mojom::OverlaySurfaceCandidateDataView,
return osc.is_clipped;
}
static bool is_opaque(const ui::OverlaySurfaceCandidate& osc) {
return osc.is_opaque;
}
static int plane_z_order(const ui::OverlaySurfaceCandidate& osc) {
return osc.plane_z_order;
}
......@@ -95,7 +91,6 @@ struct StructTraits<ui::ozone::mojom::OverlaySurfaceCandidateDataView,
static bool Read(ui::ozone::mojom::OverlaySurfaceCandidateDataView data,
ui::OverlaySurfaceCandidate* out) {
out->is_clipped = data.is_clipped();
out->is_opaque = data.is_opaque();
out->plane_z_order = data.plane_z_order();
out->overlay_handled = data.overlay_handled();
return data.ReadTransform(&out->transform) &&
......
......@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/ozone/public/mojom/overlay_surface_candidate_mojom_traits.h"
#include <utility>
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/point.h"
#include "ui/ozone/public/mojom/overlay_surface_candidate.mojom.h"
#include "ui/ozone/public/mojom/overlay_surface_candidate_mojom_traits.h"
#include "ui/ozone/public/overlay_surface_candidate.h"
namespace ui {
......@@ -23,7 +22,6 @@ TEST(OverlaySurfaceCandidateStructTraitsTest, FieldsEqual) {
input.crop_rect = gfx::RectF(10., 20., 30., 40.);
input.clip_rect = gfx::Rect(11, 21, 31, 41);
input.is_clipped = true;
input.is_opaque = true;
input.plane_z_order = 42;
input.overlay_handled = true;
......@@ -41,7 +39,6 @@ TEST(OverlaySurfaceCandidateStructTraitsTest, FieldsEqual) {
EXPECT_EQ(input.crop_rect, output.crop_rect);
EXPECT_EQ(input.clip_rect, output.clip_rect);
EXPECT_EQ(input.is_clipped, output.is_clipped);
EXPECT_EQ(input.is_opaque, output.is_opaque);
EXPECT_EQ(input.plane_z_order, output.plane_z_order);
EXPECT_EQ(input.overlay_handled, output.overlay_handled);
}
......@@ -50,7 +47,6 @@ TEST(OverlaySurfaceCandidateStructTraitsTest, FalseBools) {
ui::OverlaySurfaceCandidate input;
input.is_clipped = false;
input.is_opaque = false;
input.overlay_handled = false;
ui::OverlaySurfaceCandidate output;
......@@ -60,7 +56,6 @@ TEST(OverlaySurfaceCandidateStructTraitsTest, FalseBools) {
EXPECT_TRUE(success);
EXPECT_EQ(input.is_clipped, output.is_clipped);
EXPECT_EQ(input.is_opaque, output.is_opaque);
EXPECT_EQ(input.overlay_handled, output.overlay_handled);
}
......
......@@ -30,7 +30,7 @@ class COMPONENT_EXPORT(OZONE_BASE) OverlaySurfaceCandidate {
~OverlaySurfaceCandidate();
OverlaySurfaceCandidate& operator=(const OverlaySurfaceCandidate& other);
// Note that |clip_rect|, |is_clipped|, |is_opaque| and |overlay_handled| are
// Note that |clip_rect|, |is_clipped| and |overlay_handled| are
// *not* used as part of the comparison.
bool operator<(const OverlaySurfaceCandidate& other) const;
......@@ -53,8 +53,6 @@ class COMPONENT_EXPORT(OZONE_BASE) OverlaySurfaceCandidate {
gfx::Rect clip_rect;
// If the quad is clipped after composition.
bool is_clipped = false;
// If the quad doesn't require blending.
bool is_opaque = false;
// To be modified by the implementer if this candidate can go into
// an overlay.
......
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