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

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

Issue 821023003: [Ozone-DRI] Listen for swap events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async-swap
Patch Set: Added comment 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/ozone_platform_dri.cc ('k') | ui/ozone/platform/dri/page_flip_observer.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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 #else 141 #else
142 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 142 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
143 make_scoped_ptr(new StubKeyboardLayoutEngine())); 143 make_scoped_ptr(new StubKeyboardLayoutEngine()));
144 #endif 144 #endif
145 event_factory_ozone_.reset(new EventFactoryEvdev( 145 event_factory_ozone_.reset(new EventFactoryEvdev(
146 window_manager_->cursor(), device_manager_.get(), 146 window_manager_->cursor(), device_manager_.get(),
147 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); 147 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
148 } 148 }
149 149
150 void InitializeGPU() override { 150 void InitializeGPU() override {
151 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath)); 151 dri_.reset(new DriWrapper(kDefaultGraphicsCardPath, false));
152 dri_->Initialize(); 152 dri_->Initialize();
153 buffer_generator_.reset(new GbmBufferGenerator(dri_.get())); 153 buffer_generator_.reset(new GbmBufferGenerator(dri_.get()));
154 screen_manager_.reset( 154 screen_manager_.reset(
155 new ScreenManager(dri_.get(), buffer_generator_.get())); 155 new ScreenManager(dri_.get(), buffer_generator_.get()));
156 window_delegate_manager_.reset(new DriWindowDelegateManager()); 156 window_delegate_manager_.reset(new DriWindowDelegateManager());
157 if (!surface_factory_ozone_) 157 if (!surface_factory_ozone_)
158 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 158 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
159 159
160 surface_factory_ozone_->InitializeGpu( 160 surface_factory_ozone_->InitializeGpu(
161 dri_.get(), buffer_generator_->device(), screen_manager_.get(), 161 dri_.get(), buffer_generator_->device(), screen_manager_.get(),
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 }; 195 };
196 196
197 } // namespace 197 } // namespace
198 198
199 OzonePlatform* CreateOzonePlatformGbm() { 199 OzonePlatform* CreateOzonePlatformGbm() {
200 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 200 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
201 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 201 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
202 } 202 }
203 203
204 } // namespace ui 204 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | ui/ozone/platform/dri/page_flip_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698