| 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/drm/ozone_platform_gbm.h" | 5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <gbm.h> | 9 #include <gbm.h> |
| 10 #include <stdlib.h> | 10 #include <stdlib.h> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 GpuPlatformSupport* GetGpuPlatformSupport() override { | 93 GpuPlatformSupport* GetGpuPlatformSupport() override { |
| 94 return gpu_platform_support_.get(); | 94 return gpu_platform_support_.get(); |
| 95 } | 95 } |
| 96 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { | 96 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { |
| 97 return gpu_platform_support_host_.get(); | 97 return gpu_platform_support_host_.get(); |
| 98 } | 98 } |
| 99 scoped_ptr<SystemInputInjector> CreateSystemInputInjector() override { | 99 scoped_ptr<SystemInputInjector> CreateSystemInputInjector() override { |
| 100 return event_factory_ozone_->CreateSystemInputInjector(); | 100 return event_factory_ozone_->CreateSystemInputInjector(); |
| 101 } | 101 } |
| 102 void GetSupportedFormats(std::vector<uint32_t>* support_formats) override { |
| 103 if (drm_thread_.get()) |
| 104 return drm_thread_->GetSupportedFormats(support_formats); |
| 105 } |
| 102 scoped_ptr<PlatformWindow> CreatePlatformWindow( | 106 scoped_ptr<PlatformWindow> CreatePlatformWindow( |
| 103 PlatformWindowDelegate* delegate, | 107 PlatformWindowDelegate* delegate, |
| 104 const gfx::Rect& bounds) override { | 108 const gfx::Rect& bounds) override { |
| 105 scoped_ptr<DrmWindowHost> platform_window( | 109 scoped_ptr<DrmWindowHost> platform_window( |
| 106 new DrmWindowHost(delegate, bounds, gpu_platform_support_host_.get(), | 110 new DrmWindowHost(delegate, bounds, gpu_platform_support_host_.get(), |
| 107 event_factory_ozone_.get(), cursor_.get(), | 111 event_factory_ozone_.get(), cursor_.get(), |
| 108 window_manager_.get(), display_manager_.get())); | 112 window_manager_.get(), display_manager_.get())); |
| 109 platform_window->Initialize(); | 113 platform_window->Initialize(); |
| 110 return std::move(platform_window); | 114 return std::move(platform_window); |
| 111 } | 115 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); | 187 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); |
| 184 }; | 188 }; |
| 185 | 189 |
| 186 } // namespace | 190 } // namespace |
| 187 | 191 |
| 188 OzonePlatform* CreateOzonePlatformGbm() { | 192 OzonePlatform* CreateOzonePlatformGbm() { |
| 189 return new OzonePlatformGbm; | 193 return new OzonePlatformGbm; |
| 190 } | 194 } |
| 191 | 195 |
| 192 } // namespace ui | 196 } // namespace ui |
| OLD | NEW |