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

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

Issue 973813002: ui: ozone: dri: fix compilation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | 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/gbm_surface_factory.h" 5 #include "ui/ozone/platform/dri/gbm_surface_factory.h"
6 6
7 #include <gbm.h> 7 #include <gbm.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 DrmDeviceManager* drm_device_manager, 79 DrmDeviceManager* drm_device_manager,
80 DriWindowDelegateManager* window_manager) { 80 DriWindowDelegateManager* window_manager) {
81 drm_device_manager_ = drm_device_manager; 81 drm_device_manager_ = drm_device_manager;
82 window_manager_ = window_manager; 82 window_manager_ = window_manager;
83 } 83 }
84 84
85 intptr_t GbmSurfaceFactory::GetNativeDisplay() { 85 intptr_t GbmSurfaceFactory::GetNativeDisplay() {
86 #if defined(USE_MESA_PLATFORM_NULL) 86 #if defined(USE_MESA_PLATFORM_NULL)
87 return EGL_DEFAULT_DISPLAY; 87 return EGL_DEFAULT_DISPLAY;
88 #else 88 #else
89 scoped_refptr<GbmWrapper> gbm = GetGbmDevice(gfx::kNullAcceleratedWidget); 89 scoped_refptr<GbmDevice> gbm = GetGbmDevice(gfx::kNullAcceleratedWidget);
90 DCHECK(gbm); 90 DCHECK(gbm);
91 return reinterpret_cast<intptr_t>(gbm->device()); 91 return reinterpret_cast<intptr_t>(gbm->device());
92 #endif 92 #endif
93 } 93 }
94 94
95 int GbmSurfaceFactory::GetDrmFd() { 95 int GbmSurfaceFactory::GetDrmFd() {
96 scoped_refptr<GbmDevice> gbm = GetGbmDevice(gfx::kNullAcceleratedWidget); 96 scoped_refptr<GbmDevice> gbm = GetGbmDevice(gfx::kNullAcceleratedWidget);
97 DCHECK(gbm); 97 DCHECK(gbm);
98 return gbm->get_fd(); 98 return gbm->get_fd();
99 } 99 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 return false; 220 return false;
221 } 221 }
222 222
223 scoped_refptr<GbmDevice> GbmSurfaceFactory::GetGbmDevice( 223 scoped_refptr<GbmDevice> GbmSurfaceFactory::GetGbmDevice(
224 gfx::AcceleratedWidget widget) { 224 gfx::AcceleratedWidget widget) {
225 return static_cast<GbmDevice*>( 225 return static_cast<GbmDevice*>(
226 drm_device_manager_->GetDrmDevice(widget).get()); 226 drm_device_manager_->GetDrmDevice(widget).get());
227 } 227 }
228 228
229 } // namespace ui 229 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698