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

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: Enable vaapi_h264_decoder_unittest on Ozone Created 6 years, 1 month 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() 109 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
110 override { 110 override {
111 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy( 111 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy(
112 gpu_platform_support_host_.get(), device_manager_.get())); 112 gpu_platform_support_host_.get(), device_manager_.get()));
113 } 113 }
114 virtual void InitializeUI() override { 114 virtual void InitializeUI() override {
115 vt_manager_.reset(new VirtualTerminalManager()); 115 vt_manager_.reset(new VirtualTerminalManager());
116 // Needed since the browser process creates the accelerated widgets and that 116 // Needed since the browser process creates the accelerated widgets and that
117 // happens through SFO. 117 // happens through SFO.
118 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 118 if (!surface_factory_ozone_)
kalyank 2014/11/01 19:28:35 Why is this needed ?
llandwerlin-old 2014/11/03 09:30:11 We don't want to initialize the surface factory tw
kalyank 2014/11/04 01:04:19 This should be the case only when in single proces
dnicoara 2014/11/04 01:26:27 When running in-process, InitializeUI() should be
kalyank 2014/11/04 16:45:10 Ya, so we don't need this change basically.
119 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
119 device_manager_ = CreateDeviceManager(); 120 device_manager_ = CreateDeviceManager();
120 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); 121 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost());
121 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 122 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
122 window_manager_.reset( 123 window_manager_.reset(
123 new DriWindowManager(gpu_platform_support_host_.get())); 124 new DriWindowManager(gpu_platform_support_host_.get()));
124 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), 125 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(),
125 device_manager_.get())); 126 device_manager_.get()));
126 } 127 }
127 128
128 virtual void InitializeGPU() override { 129 virtual void InitializeGPU() override {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 }; 174 };
174 175
175 } // namespace 176 } // namespace
176 177
177 OzonePlatform* CreateOzonePlatformGbm() { 178 OzonePlatform* CreateOzonePlatformGbm() {
178 CommandLine* cmd = CommandLine::ForCurrentProcess(); 179 CommandLine* cmd = CommandLine::ForCurrentProcess();
179 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 180 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
180 } 181 }
181 182
182 } // namespace ui 183 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698