| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 if (drm_thread_proxy_) | 117 if (drm_thread_proxy_) |
| 118 drm_thread_proxy_->AddBinding(std::move(request)); | 118 drm_thread_proxy_->AddBinding(std::move(request)); |
| 119 else | 119 else |
| 120 pending_cursor_requests_.push_back(std::move(request)); | 120 pending_cursor_requests_.push_back(std::move(request)); |
| 121 } | 121 } |
| 122 std::unique_ptr<PlatformWindow> CreatePlatformWindow( | 122 std::unique_ptr<PlatformWindow> CreatePlatformWindow( |
| 123 PlatformWindowDelegate* delegate, | 123 PlatformWindowDelegate* delegate, |
| 124 const gfx::Rect& bounds) override { | 124 const gfx::Rect& bounds) override { |
| 125 GpuThreadAdapter* adapter = gpu_platform_support_host_.get(); | 125 GpuThreadAdapter* adapter = gpu_platform_support_host_.get(); |
| 126 if (using_mojo_ || single_process_) { | 126 if (using_mojo_ || single_process_) { |
| 127 DCHECK(drm_thread_proxy_) | |
| 128 << "drm_thread_proxy_ should exist (and be running) here."; | |
| 129 adapter = mus_thread_proxy_.get(); | 127 adapter = mus_thread_proxy_.get(); |
| 130 } | 128 } |
| 131 | 129 |
| 132 std::unique_ptr<DrmWindowHost> platform_window(new DrmWindowHost( | 130 std::unique_ptr<DrmWindowHost> platform_window(new DrmWindowHost( |
| 133 delegate, bounds, adapter, event_factory_ozone_.get(), cursor_.get(), | 131 delegate, bounds, adapter, event_factory_ozone_.get(), cursor_.get(), |
| 134 window_manager_.get(), display_manager_.get(), overlay_manager_.get())); | 132 window_manager_.get(), display_manager_.get(), overlay_manager_.get())); |
| 135 platform_window->Initialize(); | 133 platform_window->Initialize(); |
| 136 return std::move(platform_window); | 134 return std::move(platform_window); |
| 137 } | 135 } |
| 138 std::unique_ptr<display::NativeDisplayDelegate> CreateNativeDisplayDelegate() | 136 std::unique_ptr<display::NativeDisplayDelegate> CreateNativeDisplayDelegate() |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); | 267 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); |
| 270 }; | 268 }; |
| 271 | 269 |
| 272 } // namespace | 270 } // namespace |
| 273 | 271 |
| 274 OzonePlatform* CreateOzonePlatformGbm() { | 272 OzonePlatform* CreateOzonePlatformGbm() { |
| 275 return new OzonePlatformGbm; | 273 return new OzonePlatformGbm; |
| 276 } | 274 } |
| 277 | 275 |
| 278 } // namespace ui | 276 } // namespace ui |
| OLD | NEW |