| OLD | NEW |
| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 #else | 141 #else |
| 142 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( | 142 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( |
| 143 make_scoped_ptr(new StubKeyboardLayoutEngine())); | 143 make_scoped_ptr(new StubKeyboardLayoutEngine())); |
| 144 #endif | 144 #endif |
| 145 event_factory_ozone_.reset(new EventFactoryEvdev( | 145 event_factory_ozone_.reset(new EventFactoryEvdev( |
| 146 window_manager_->cursor(), device_manager_.get(), | 146 window_manager_->cursor(), device_manager_.get(), |
| 147 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); | 147 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void InitializeGPU() override { | 150 void InitializeGPU() override { |
| 151 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath)); | 151 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath, false)); |
| 152 dri_->Initialize(); | 152 dri_->Initialize(); |
| 153 buffer_generator_.reset(new GbmBufferGenerator(dri_.get())); | 153 buffer_generator_.reset(new GbmBufferGenerator(dri_.get())); |
| 154 screen_manager_.reset( | 154 screen_manager_.reset( |
| 155 new ScreenManager(dri_.get(), buffer_generator_.get())); | 155 new ScreenManager(dri_.get(), buffer_generator_.get())); |
| 156 window_delegate_manager_.reset(new DriWindowDelegateManager()); | 156 window_delegate_manager_.reset(new DriWindowDelegateManager()); |
| 157 if (!surface_factory_ozone_) | 157 if (!surface_factory_ozone_) |
| 158 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); | 158 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); |
| 159 | 159 |
| 160 surface_factory_ozone_->InitializeGpu( | 160 surface_factory_ozone_->InitializeGpu( |
| 161 dri_.get(), buffer_generator_->device(), screen_manager_.get(), | 161 dri_.get(), buffer_generator_->device(), screen_manager_.get(), |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 } // namespace | 197 } // namespace |
| 198 | 198 |
| 199 OzonePlatform* CreateOzonePlatformGbm() { | 199 OzonePlatform* CreateOzonePlatformGbm() { |
| 200 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 200 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
| 201 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); | 201 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace ui | 204 } // namespace ui |
| OLD | NEW |