| 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 <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <gbm.h> | 9 #include <gbm.h> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 virtual void InitializeUI() OVERRIDE { | 92 virtual void InitializeUI() OVERRIDE { |
| 93 vt_manager_.reset(new VirtualTerminalManager()); | 93 vt_manager_.reset(new VirtualTerminalManager()); |
| 94 // Needed since the browser process creates the accelerated widgets and that | 94 // Needed since the browser process creates the accelerated widgets and that |
| 95 // happens through SFO. | 95 // happens through SFO. |
| 96 surface_factory_ozone_.reset(new GbmSurfaceFactory(NULL, NULL, NULL)); | 96 surface_factory_ozone_.reset(new GbmSurfaceFactory(NULL, NULL, NULL)); |
| 97 | 97 |
| 98 device_manager_ = CreateDeviceManager(); | 98 device_manager_ = CreateDeviceManager(); |
| 99 cursor_factory_ozone_.reset(new CursorFactoryOzone()); | 99 cursor_factory_ozone_.reset(new CursorFactoryOzone()); |
| 100 event_factory_ozone_.reset(new EventFactoryEvdev( | 100 event_factory_ozone_.reset(new EventFactoryEvdev( |
| 101 NULL, device_manager_.get())); | 101 NULL, device_manager_.get())); |
| 102 |
| 103 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
| 102 } | 104 } |
| 103 | 105 |
| 104 virtual void InitializeGPU() OVERRIDE { | 106 virtual void InitializeGPU() OVERRIDE { |
| 105 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath)); | 107 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath)); |
| 106 surface_generator_.reset(new GbmSurfaceGenerator(dri_.get())); | 108 surface_generator_.reset(new GbmSurfaceGenerator(dri_.get())); |
| 107 screen_manager_.reset(new ScreenManager(dri_.get(), | 109 screen_manager_.reset(new ScreenManager(dri_.get(), |
| 108 surface_generator_.get())); | 110 surface_generator_.get())); |
| 109 surface_factory_ozone_.reset( | 111 surface_factory_ozone_.reset( |
| 110 new GbmSurfaceFactory(dri_.get(), | 112 new GbmSurfaceFactory(dri_.get(), |
| 111 surface_generator_->device(), | 113 surface_generator_->device(), |
| 112 screen_manager_.get())); | 114 screen_manager_.get())); |
| 115 |
| 116 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); |
| 113 } | 117 } |
| 114 | 118 |
| 115 private: | 119 private: |
| 116 scoped_ptr<VirtualTerminalManager> vt_manager_; | 120 scoped_ptr<VirtualTerminalManager> vt_manager_; |
| 117 scoped_ptr<DriWrapper> dri_; | 121 scoped_ptr<DriWrapper> dri_; |
| 118 scoped_ptr<GbmSurfaceGenerator> surface_generator_; | 122 scoped_ptr<GbmSurfaceGenerator> surface_generator_; |
| 119 scoped_ptr<ScreenManager> screen_manager_; | 123 scoped_ptr<ScreenManager> screen_manager_; |
| 120 scoped_ptr<DeviceManager> device_manager_; | 124 scoped_ptr<DeviceManager> device_manager_; |
| 121 | 125 |
| 122 scoped_ptr<GbmSurfaceFactory> surface_factory_ozone_; | 126 scoped_ptr<GbmSurfaceFactory> surface_factory_ozone_; |
| 123 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; | 127 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; |
| 124 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; | 128 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; |
| 125 | 129 |
| 130 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; |
| 131 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; |
| 132 |
| 126 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); | 133 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); |
| 127 }; | 134 }; |
| 128 | 135 |
| 129 } // namespace | 136 } // namespace |
| 130 | 137 |
| 131 OzonePlatform* CreateOzonePlatformGbm() { return new OzonePlatformGbm; } | 138 OzonePlatform* CreateOzonePlatformGbm() { return new OzonePlatformGbm; } |
| 132 | 139 |
| 133 } // namespace ui | 140 } // namespace ui |
| OLD | NEW |