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

Side by Side Diff: ui/ozone/platform/dri/ozone_platform_dri.cc

Issue 532873002: ozone: gbm: Fail earlier if device can't be opened (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/dri/dri_wrapper.cc ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/dri/ozone_platform_dri.h" 5 #include "ui/ozone/platform/dri/ozone_platform_dri.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
9 #include "ui/events/ozone/device/device_manager.h" 9 #include "ui/events/ozone/device/device_manager.h"
10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri( 82 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri(
83 dri_.get(), screen_manager_.get(), device_manager_.get())); 83 dri_.get(), screen_manager_.get(), device_manager_.get()));
84 } 84 }
85 virtual scoped_ptr<TouchscreenDeviceManager> 85 virtual scoped_ptr<TouchscreenDeviceManager>
86 CreateTouchscreenDeviceManager() OVERRIDE { 86 CreateTouchscreenDeviceManager() OVERRIDE {
87 return scoped_ptr<TouchscreenDeviceManager>( 87 return scoped_ptr<TouchscreenDeviceManager>(
88 new TouchscreenDeviceManagerOzone()); 88 new TouchscreenDeviceManagerOzone());
89 } 89 }
90 #endif 90 #endif
91 virtual void InitializeUI() OVERRIDE { 91 virtual void InitializeUI() OVERRIDE {
92 dri_->Initialize();
92 surface_factory_ozone_.reset(new DriSurfaceFactory( 93 surface_factory_ozone_.reset(new DriSurfaceFactory(
93 dri_.get(), screen_manager_.get(), &window_manager_)); 94 dri_.get(), screen_manager_.get(), &window_manager_));
94 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 95 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
95 cursor_.reset(new DriCursor(surface_factory_ozone_.get())); 96 cursor_.reset(new DriCursor(surface_factory_ozone_.get()));
96 event_factory_ozone_.reset( 97 event_factory_ozone_.reset(
97 new EventFactoryEvdev(cursor_.get(), device_manager_.get())); 98 new EventFactoryEvdev(cursor_.get(), device_manager_.get()));
98 if (surface_factory_ozone_->InitializeHardware() != 99 if (surface_factory_ozone_->InitializeHardware() !=
99 DriSurfaceFactory::INITIALIZED) 100 DriSurfaceFactory::INITIALIZED)
100 LOG(FATAL) << "failed to initialize display hardware"; 101 LOG(FATAL) << "failed to initialize display hardware";
101 102
(...skipping 16 matching lines...) Expand all
118 DriWindowManager window_manager_; 119 DriWindowManager window_manager_;
119 120
120 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); 121 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri);
121 }; 122 };
122 123
123 } // namespace 124 } // namespace
124 125
125 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } 126 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; }
126 127
127 } // namespace ui 128 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_wrapper.cc ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698