Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: ui/ozone/platform/drm/ozone_platform_gbm.cc

Issue 1598573002: Propagate supported scanout formats from driver to SurfaceFactoryOzone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698