| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_dri.h" | 5 #include "ui/ozone/platform/dri/ozone_platform_dri.h" |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" | 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" |
| 9 #include "ui/events/ozone/device/device_manager.h" | 9 #include "ui/events/ozone/device/device_manager.h" |
| 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" | 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 ndd->Initialize(); | 92 ndd->Initialize(); |
| 93 gpu_platform_support_.reset( | 93 gpu_platform_support_.reset( |
| 94 new DriGpuPlatformSupport(dri_.get(), &window_delegate_manager_, | 94 new DriGpuPlatformSupport(dri_.get(), &window_delegate_manager_, |
| 95 screen_manager_.get(), ndd.Pass())); | 95 screen_manager_.get(), ndd.Pass())); |
| 96 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); | 96 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); |
| 97 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); | 97 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); |
| 98 window_manager_.reset( | 98 window_manager_.reset( |
| 99 new DriWindowManager(gpu_platform_support_host_.get())); | 99 new DriWindowManager(gpu_platform_support_host_.get())); |
| 100 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), | 100 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), |
| 101 device_manager_.get())); | 101 device_manager_.get())); |
| 102 if (surface_factory_ozone_->InitializeHardware() != | |
| 103 DriSurfaceFactory::INITIALIZED) | |
| 104 LOG(FATAL) << "Failed to initialize display hardware."; | |
| 105 | 102 |
| 106 if (!ui_thread_gpu_.Initialize()) | 103 if (!ui_thread_gpu_.Initialize()) |
| 107 LOG(FATAL) << "Failed to initialize dummy channel."; | 104 LOG(FATAL) << "Failed to initialize dummy channel."; |
| 108 } | 105 } |
| 109 | 106 |
| 110 void InitializeGPU() override {} | 107 void InitializeGPU() override {} |
| 111 | 108 |
| 112 private: | 109 private: |
| 113 scoped_ptr<DriWrapper> dri_; | 110 scoped_ptr<DriWrapper> dri_; |
| 114 scoped_ptr<DriBufferGenerator> buffer_generator_; | 111 scoped_ptr<DriBufferGenerator> buffer_generator_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 130 UiThreadGpu ui_thread_gpu_; | 127 UiThreadGpu ui_thread_gpu_; |
| 131 | 128 |
| 132 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 129 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
| 133 }; | 130 }; |
| 134 | 131 |
| 135 } // namespace | 132 } // namespace |
| 136 | 133 |
| 137 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } | 134 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } |
| 138 | 135 |
| 139 } // namespace ui | 136 } // namespace ui |
| OLD | NEW |