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

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

Issue 399953003: ozone: Remove InitializeHardware / ShutdownHardware (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests more Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_gbm.h" 5 #include "ui/ozone/platform/dri/ozone_platform_gbm.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gbm.h> 8 #include <gbm.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath)); 130 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath));
131 buffer_generator_.reset(new GbmBufferGenerator(dri_.get())); 131 buffer_generator_.reset(new GbmBufferGenerator(dri_.get()));
132 screen_manager_.reset(new ScreenManager(dri_.get(), 132 screen_manager_.reset(new ScreenManager(dri_.get(),
133 buffer_generator_.get())); 133 buffer_generator_.get()));
134 if (!surface_factory_ozone_) 134 if (!surface_factory_ozone_)
135 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 135 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
136 136
137 surface_factory_ozone_->InitializeGpu(dri_.get(), 137 surface_factory_ozone_->InitializeGpu(dri_.get(),
138 buffer_generator_->device(), 138 buffer_generator_->device(),
139 screen_manager_.get()); 139 screen_manager_.get());
140
141 gpu_platform_support_.reset( 140 gpu_platform_support_.reset(
142 new GpuPlatformSupportGbm(surface_factory_ozone_.get())); 141 new GpuPlatformSupportGbm(surface_factory_ozone_.get()));
143 #if defined(OS_CHROMEOS) 142 #if defined(OS_CHROMEOS)
144 gpu_platform_support_->AddHandler(scoped_ptr<GpuPlatformSupport>( 143 gpu_platform_support_->AddHandler(scoped_ptr<GpuPlatformSupport>(
145 new DisplayMessageHandler( 144 new DisplayMessageHandler(
146 scoped_ptr<NativeDisplayDelegateDri>(new NativeDisplayDelegateDri( 145 scoped_ptr<NativeDisplayDelegateDri>(new NativeDisplayDelegateDri(
147 dri_.get(), 146 dri_.get(),
148 screen_manager_.get(), 147 screen_manager_.get(),
149 NULL))))); 148 NULL)))));
150 #endif 149 #endif
150 if (surface_factory_ozone_->InitializeHardware() !=
151 DriSurfaceFactory::INITIALIZED)
152 LOG(FATAL) << "failed to initialize display hardware";
151 } 153 }
152 154
153 private: 155 private:
154 bool use_surfaceless_; 156 bool use_surfaceless_;
155 scoped_ptr<VirtualTerminalManager> vt_manager_; 157 scoped_ptr<VirtualTerminalManager> vt_manager_;
156 scoped_ptr<DriWrapper> dri_; 158 scoped_ptr<DriWrapper> dri_;
157 scoped_ptr<GbmBufferGenerator> buffer_generator_; 159 scoped_ptr<GbmBufferGenerator> buffer_generator_;
158 scoped_ptr<ScreenManager> screen_manager_; 160 scoped_ptr<ScreenManager> screen_manager_;
159 scoped_ptr<DeviceManager> device_manager_; 161 scoped_ptr<DeviceManager> device_manager_;
160 162
(...skipping 10 matching lines...) Expand all
171 } // namespace 173 } // namespace
172 174
173 OzonePlatform* CreateOzonePlatformGbm() { 175 OzonePlatform* CreateOzonePlatformGbm() {
174 return new OzonePlatformGbm(false); 176 return new OzonePlatformGbm(false);
175 } 177 }
176 OzonePlatform* CreateOzonePlatformGbmEglImage() { 178 OzonePlatform* CreateOzonePlatformGbmEglImage() {
177 return new OzonePlatformGbm(true); 179 return new OzonePlatformGbm(true);
178 } 180 }
179 181
180 } // namespace ui 182 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698