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

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

Issue 847213002: [Ozone-DRI] Re-enable GBM surface mode support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests Created 5 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
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface.cc ('k') | ui/ozone/platform/dri/test/mock_dri_wrapper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 #else 139 #else
140 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 140 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
141 make_scoped_ptr(new StubKeyboardLayoutEngine())); 141 make_scoped_ptr(new StubKeyboardLayoutEngine()));
142 #endif 142 #endif
143 event_factory_ozone_.reset(new EventFactoryEvdev( 143 event_factory_ozone_.reset(new EventFactoryEvdev(
144 window_manager_->cursor(), device_manager_.get(), 144 window_manager_->cursor(), device_manager_.get(),
145 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); 145 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
146 } 146 }
147 147
148 void InitializeGPU() override { 148 void InitializeGPU() override {
149 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath, false)); 149 // Async page flips are supported only on surfaceless mode.
150 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath, !use_surfaceless_));
150 dri_->Initialize(); 151 dri_->Initialize();
151 buffer_generator_.reset(new GbmBufferGenerator(dri_.get())); 152 buffer_generator_.reset(new GbmBufferGenerator(dri_.get()));
152 screen_manager_.reset( 153 screen_manager_.reset(
153 new ScreenManager(dri_.get(), buffer_generator_.get())); 154 new ScreenManager(dri_.get(), buffer_generator_.get()));
154 window_delegate_manager_.reset(new DriWindowDelegateManager()); 155 window_delegate_manager_.reset(new DriWindowDelegateManager());
155 if (!surface_factory_ozone_) 156 if (!surface_factory_ozone_)
156 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 157 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
157 158
158 surface_factory_ozone_->InitializeGpu( 159 surface_factory_ozone_->InitializeGpu(
159 dri_.get(), buffer_generator_->device(), screen_manager_.get(), 160 dri_.get(), buffer_generator_->device(), screen_manager_.get(),
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 }; 194 };
194 195
195 } // namespace 196 } // namespace
196 197
197 OzonePlatform* CreateOzonePlatformGbm() { 198 OzonePlatform* CreateOzonePlatformGbm() {
198 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 199 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
199 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 200 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
200 } 201 }
201 202
202 } // namespace ui 203 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface.cc ('k') | ui/ozone/platform/dri/test/mock_dri_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698