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

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: Fix vaapi_h264_decoder_unittest 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 114 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
115 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy( 115 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy(
116 gpu_platform_support_host_.get(), device_manager_.get(), 116 gpu_platform_support_host_.get(), device_manager_.get(),
117 display_manager_.get())); 117 display_manager_.get()));
118 } 118 }
119 void InitializeUI() override { 119 void InitializeUI() override {
120 display_manager_.reset(new DisplayManager()); 120 display_manager_.reset(new DisplayManager());
121 // Needed since the browser process creates the accelerated widgets and that 121 // Needed since the browser process creates the accelerated widgets and that
122 // happens through SFO. 122 // happens through SFO.
123 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 123 if (!surface_factory_ozone_)
124 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
124 device_manager_ = CreateDeviceManager(); 125 device_manager_ = CreateDeviceManager();
125 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); 126 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost());
126 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 127 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
127 window_manager_.reset( 128 window_manager_.reset(
128 new DriWindowManager(gpu_platform_support_host_.get())); 129 new DriWindowManager(gpu_platform_support_host_.get()));
129 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), 130 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(),
130 device_manager_.get())); 131 device_manager_.get()));
131 } 132 }
132 133
133 void InitializeGPU() override { 134 void InitializeGPU() override {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 }; 175 };
175 176
176 } // namespace 177 } // namespace
177 178
178 OzonePlatform* CreateOzonePlatformGbm() { 179 OzonePlatform* CreateOzonePlatformGbm() {
179 CommandLine* cmd = CommandLine::ForCurrentProcess(); 180 CommandLine* cmd = CommandLine::ForCurrentProcess();
180 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 181 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
181 } 182 }
182 183
183 } // namespace ui 184 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698