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

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

Issue 758853005: Remove Initialize/Shutdown from DriSurfaceFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GN Created 6 years 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/ozone_platform_dri.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 surface_factory_ozone_->InitializeGpu( 143 surface_factory_ozone_->InitializeGpu(
144 dri_.get(), buffer_generator_->device(), screen_manager_.get(), 144 dri_.get(), buffer_generator_->device(), screen_manager_.get(),
145 window_delegate_manager_.get()); 145 window_delegate_manager_.get());
146 scoped_ptr<NativeDisplayDelegateDri> ndd( 146 scoped_ptr<NativeDisplayDelegateDri> ndd(
147 new NativeDisplayDelegateDri(dri_.get(), screen_manager_.get())); 147 new NativeDisplayDelegateDri(dri_.get(), screen_manager_.get()));
148 ndd->Initialize(); 148 ndd->Initialize();
149 gpu_platform_support_.reset( 149 gpu_platform_support_.reset(
150 new DriGpuPlatformSupport(dri_.get(), window_delegate_manager_.get(), 150 new DriGpuPlatformSupport(dri_.get(), window_delegate_manager_.get(),
151 screen_manager_.get(), ndd.Pass())); 151 screen_manager_.get(), ndd.Pass()));
152 if (surface_factory_ozone_->InitializeHardware() !=
153 DriSurfaceFactory::INITIALIZED)
154 LOG(FATAL) << "failed to initialize display hardware";
155 } 152 }
156 153
157 private: 154 private:
158 bool use_surfaceless_; 155 bool use_surfaceless_;
159 scoped_ptr<DriWrapper> dri_; 156 scoped_ptr<DriWrapper> dri_;
160 scoped_ptr<GbmBufferGenerator> buffer_generator_; 157 scoped_ptr<GbmBufferGenerator> buffer_generator_;
161 scoped_ptr<ScreenManager> screen_manager_; 158 scoped_ptr<ScreenManager> screen_manager_;
162 scoped_ptr<DeviceManager> device_manager_; 159 scoped_ptr<DeviceManager> device_manager_;
163 160
164 scoped_ptr<GbmSurfaceFactory> surface_factory_ozone_; 161 scoped_ptr<GbmSurfaceFactory> surface_factory_ozone_;
(...skipping 12 matching lines...) Expand all
177 }; 174 };
178 175
179 } // namespace 176 } // namespace
180 177
181 OzonePlatform* CreateOzonePlatformGbm() { 178 OzonePlatform* CreateOzonePlatformGbm() {
182 CommandLine* cmd = CommandLine::ForCurrentProcess(); 179 CommandLine* cmd = CommandLine::ForCurrentProcess();
183 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 180 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
184 } 181 }
185 182
186 } // namespace ui 183 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698