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

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

Issue 856423002: [Ozone-Dri] Decouple the IO helper thread from DriWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gbm-wrapper
Patch Set: . Created 5 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 unified diff | Download patch
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 make_scoped_ptr(new StubKeyboardLayoutEngine())); 145 make_scoped_ptr(new StubKeyboardLayoutEngine()));
146 #endif 146 #endif
147 event_factory_ozone_.reset(new EventFactoryEvdev( 147 event_factory_ozone_.reset(new EventFactoryEvdev(
148 cursor_.get(), device_manager_.get(), 148 cursor_.get(), device_manager_.get(),
149 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); 149 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
150 } 150 }
151 151
152 void InitializeGPU() override { 152 void InitializeGPU() override {
153 gl_api_loader_.reset(new GlApiLoader()); 153 gl_api_loader_.reset(new GlApiLoader());
154 // Async page flips are supported only on surfaceless mode. 154 // Async page flips are supported only on surfaceless mode.
155 gbm_.reset(new GbmWrapper(kDefaultGraphicsCardPath, !use_surfaceless_)); 155 gbm_.reset(new GbmWrapper(kDefaultGraphicsCardPath));
156 gbm_->Initialize(); 156 gbm_->Initialize();
157 buffer_generator_.reset(new GbmBufferGenerator()); 157 buffer_generator_.reset(new GbmBufferGenerator());
158 screen_manager_.reset( 158 screen_manager_.reset(
159 new ScreenManager(gbm_.get(), buffer_generator_.get())); 159 new ScreenManager(gbm_.get(), buffer_generator_.get()));
160 window_delegate_manager_.reset(new DriWindowDelegateManager()); 160 window_delegate_manager_.reset(new DriWindowDelegateManager());
161 if (!surface_factory_ozone_) 161 if (!surface_factory_ozone_)
162 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 162 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
163 163
164 surface_factory_ozone_->InitializeGpu(gbm_.get(), screen_manager_.get(), 164 surface_factory_ozone_->InitializeGpu(gbm_.get(), screen_manager_.get(),
165 window_delegate_manager_.get()); 165 window_delegate_manager_.get());
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 OzonePlatform* CreateOzonePlatformGbm() { 204 OzonePlatform* CreateOzonePlatformGbm() {
205 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 205 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
206 #if defined(USE_MESA_PLATFORM_NULL) 206 #if defined(USE_MESA_PLATFORM_NULL)
207 // Only works with surfaceless. 207 // Only works with surfaceless.
208 cmd->AppendSwitch(switches::kOzoneUseSurfaceless); 208 cmd->AppendSwitch(switches::kOzoneUseSurfaceless);
209 #endif 209 #endif
210 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 210 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
211 } 211 }
212 212
213 } // namespace ui 213 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | ui/ozone/platform/dri/test/mock_dri_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698