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

Unified Diff: content/browser/compositor/software_output_device_ozone.cc

Issue 1575943002: ozone: gracefully handle SoftwareOutputDeviceOzoneTest.CheckCorrectResizeBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: content/browser/compositor/software_output_device_ozone.cc
diff --git a/content/browser/compositor/software_output_device_ozone.cc b/content/browser/compositor/software_output_device_ozone.cc
index e53935ac30d7bcc1ef9c357ea70cba641618be2e..28e0d4156678c05cb4553e44103acbe1eceb7d8a 100644
--- a/content/browser/compositor/software_output_device_ozone.cc
+++ b/content/browser/compositor/software_output_device_ozone.cc
@@ -12,6 +12,16 @@
namespace content {
+// static
+scoped_ptr<SoftwareOutputDeviceOzone> SoftwareOutputDeviceOzone::Create(
+ ui::Compositor* compositor) {
+ scoped_ptr<SoftwareOutputDeviceOzone> result(
+ new SoftwareOutputDeviceOzone(compositor));
+ if (!result->surface_ozone_)
+ return nullptr;
+ return result;
+}
+
SoftwareOutputDeviceOzone::SoftwareOutputDeviceOzone(ui::Compositor* compositor)
: compositor_(compositor) {
ui::SurfaceFactoryOzone* factory =
@@ -19,8 +29,10 @@ SoftwareOutputDeviceOzone::SoftwareOutputDeviceOzone(ui::Compositor* compositor)
surface_ozone_ = factory->CreateCanvasForWidget(compositor_->widget());
- if (!surface_ozone_)
- LOG(FATAL) << "Failed to initialize canvas";
+ if (!surface_ozone_) {
+ LOG(ERROR) << "Failed to initialize canvas";
+ return;
+ }
vsync_provider_ = surface_ozone_->CreateVSyncProvider();
}

Powered by Google App Engine
This is Rietveld 408576698