Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc

Issue 2712463002: ozone: Reject overlays when a test buffer can't be allocated. (Closed)
Patch Set: Remove DCHECK that one plane would always succeed. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc b/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc
index 6a3b1b65a8202edae6722b0fd310544130ddeab7..f0a69e73ee3e6c36356fd60b50ee48b97e8decbe 100644
--- a/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc
+++ b/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc
@@ -628,3 +628,13 @@ TEST_F(DrmOverlayValidatorTest, DontResetOriginalBufferIfProcessedIsInvalid) {
plane_list_.back().processing_callback = base::Bind(
&DrmOverlayValidatorTest::ProcessBuffer, base::Unretained(this));
}
+
+TEST_F(DrmOverlayValidatorTest, RejectBufferAllocationFail) {
+ // Buffer allocation for scanout might fail.
+ // In that case we should reject the overlay candidate.
+ buffer_generator_->set_allocation_failure(true);
+
+ std::vector<ui::OverlayCheck_Params> validated_params =
+ overlay_validator_->TestPageFlip(overlay_params_, ui::OverlayPlaneList());
+ EXPECT_FALSE(validated_params.front().is_overlay_candidate);
+}
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_overlay_validator.cc ('k') | ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698