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

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

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on ToT Created 6 years 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/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 <gbm.h> 8 #include <gbm.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 122 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
123 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy( 123 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy(
124 gpu_platform_support_host_.get(), device_manager_.get(), 124 gpu_platform_support_host_.get(), device_manager_.get(),
125 display_manager_.get())); 125 display_manager_.get()));
126 } 126 }
127 void InitializeUI() override { 127 void InitializeUI() override {
128 display_manager_.reset(new DisplayManager()); 128 display_manager_.reset(new DisplayManager());
129 // Needed since the browser process creates the accelerated widgets and that 129 // Needed since the browser process creates the accelerated widgets and that
130 // happens through SFO. 130 // happens through SFO.
131 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 131 if (!surface_factory_ozone_)
132 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
132 device_manager_ = CreateDeviceManager(); 133 device_manager_ = CreateDeviceManager();
133 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); 134 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost());
134 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 135 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
135 window_manager_.reset( 136 window_manager_.reset(
136 new DriWindowManager(gpu_platform_support_host_.get())); 137 new DriWindowManager(gpu_platform_support_host_.get()));
137 #if defined(USE_XKBCOMMON) 138 #if defined(USE_XKBCOMMON)
138 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr( 139 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr(
139 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_))); 140 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_)));
140 #else 141 #else
141 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 142 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 }; 195 };
195 196
196 } // namespace 197 } // namespace
197 198
198 OzonePlatform* CreateOzonePlatformGbm() { 199 OzonePlatform* CreateOzonePlatformGbm() {
199 CommandLine* cmd = CommandLine::ForCurrentProcess(); 200 CommandLine* cmd = CommandLine::ForCurrentProcess();
200 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 201 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
201 } 202 }
202 203
203 } // namespace ui 204 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698