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

Unified Diff: ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.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
« no previous file with comments | « ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.cc
diff --git a/ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.cc b/ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.cc
index aa2dd0fd7f7ce54e62a40467de3be4d83a7e657e..ccf53a34ba584b6bc871e33aa50c5ec3bc7629a0 100644
--- a/ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.cc
+++ b/ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.cc
@@ -17,6 +17,9 @@ scoped_refptr<ScanoutBuffer> MockScanoutBufferGenerator::Create(
const scoped_refptr<DrmDevice>& drm,
uint32_t format,
const gfx::Size& size) {
+ if (allocation_failure_)
+ return nullptr;
+
scoped_refptr<MockScanoutBuffer> buffer(new MockScanoutBuffer(size, format));
return buffer;
« no previous file with comments | « ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698