Commit 3decaf3d authored by Kristian H. Kristensen's avatar Kristian H. Kristensen Committed by Commit Bot

ozone/drm: Don't reject negative z_order planes

The incoming z_order represents the relative ordering of the planes
and is just used for sorting the list. Later we assign hw planes in
matching stacking order, so as to preserve the relative order. There's
nothing that prevents us from accepting negative z_order, so remove
this check. This makes the underlay strategy work for ozone.

Bug: 789288
Change-Id: I2961511de53b156042220edeccc4c93e4541d130
Reviewed-on: https://chromium-review.googlesource.com/969831Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544836}
parent c3816582
......@@ -117,11 +117,6 @@ bool HardwareDisplayController::ActualSchedulePageFlip(
[](const OverlayPlane& l, const OverlayPlane& r) {
return l.z_order < r.z_order;
});
if (pending_planes.front().z_order < 0) {
std::move(callback).Run(gfx::SwapResult::SWAP_FAILED,
gfx::PresentationFeedback());
return false;
}
scoped_refptr<PageFlipRequest> page_flip_request =
new PageFlipRequest(crtc_controllers_.size(), std::move(callback));
......
......@@ -218,7 +218,7 @@ TEST_F(HardwareDisplayControllerTest, CheckOverlayTestMode) {
EXPECT_EQ(2, drm_->get_overlay_flip_call_count());
}
TEST_F(HardwareDisplayControllerTest, RejectUnderlays) {
TEST_F(HardwareDisplayControllerTest, AcceptUnderlays) {
ui::OverlayPlane plane1(scoped_refptr<ui::ScanoutBuffer>(
new ui::MockScanoutBuffer(kDefaultModeSize)),
base::kInvalidPlatformFile);
......@@ -237,7 +237,8 @@ TEST_F(HardwareDisplayControllerTest, RejectUnderlays) {
controller_->SchedulePageFlip(
planes, base::Bind(&HardwareDisplayControllerTest::PageFlipCallback,
base::Unretained(this)));
EXPECT_EQ(gfx::SwapResult::SWAP_FAILED, last_swap_result_);
drm_->RunCallbacks();
EXPECT_EQ(gfx::SwapResult::SWAP_ACK, last_swap_result_);
EXPECT_EQ(1, page_flips_);
}
......
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