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

Unified Diff: ui/ozone/platform/dri/ozone_platform_gbm.cc

Issue 953363003: Figure out the default graphics card on the Browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assume-minigbm
Patch Set: Rename Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/ozone_platform_gbm.cc
diff --git a/ui/ozone/platform/dri/ozone_platform_gbm.cc b/ui/ozone/platform/dri/ozone_platform_gbm.cc
index 38a6963d586845a277cdb8f9db0b372c948f0952..7c237dfcf7d3cf09c30e88ba091805978f517c75 100644
--- a/ui/ozone/platform/dri/ozone_platform_gbm.cc
+++ b/ui/ozone/platform/dri/ozone_platform_gbm.cc
@@ -144,9 +144,10 @@ class OzonePlatformGbm : public OzonePlatform {
scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
return make_scoped_ptr(new NativeDisplayDelegateProxy(
gpu_platform_support_host_.get(), device_manager_.get(),
- display_manager_.get()));
+ display_manager_.get(), primary_graphics_card_path_));
}
void InitializeUI() override {
+ primary_graphics_card_path_ = GetPrimaryDisplayCardPath();
display_manager_.reset(new DisplayManager());
// Needed since the browser process creates the accelerated widgets and that
// happens through SFO.
@@ -174,7 +175,7 @@ class OzonePlatformGbm : public OzonePlatform {
void InitializeGPU() override {
gl_api_loader_.reset(new GlApiLoader());
// Async page flips are supported only on surfaceless mode.
- gbm_ = new GbmWrapper(GetFirstDisplayCardPath());
+ gbm_ = new GbmWrapper(GetPrimaryDisplayCardPath());
if (!gbm_->Initialize())
LOG(FATAL) << "Failed to initialize primary DRM device";
@@ -201,6 +202,7 @@ class OzonePlatformGbm : public OzonePlatform {
private:
bool use_surfaceless_;
+ base::FilePath primary_graphics_card_path_;
scoped_ptr<GlApiLoader> gl_api_loader_;
scoped_refptr<GbmWrapper> gbm_;
scoped_ptr<DrmDeviceManager> drm_device_manager_;
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698