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

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

Issue 922923002: ui: Cleanup the usage of scoped_ptr throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE 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 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 PlatformWindowDelegate* delegate, 114 PlatformWindowDelegate* delegate,
115 const gfx::Rect& bounds) override { 115 const gfx::Rect& bounds) override {
116 scoped_ptr<DriWindow> platform_window( 116 scoped_ptr<DriWindow> platform_window(
117 new DriWindow(delegate, bounds, gpu_platform_support_host_.get(), 117 new DriWindow(delegate, bounds, gpu_platform_support_host_.get(),
118 event_factory_ozone_.get(), cursor_.get(), 118 event_factory_ozone_.get(), cursor_.get(),
119 window_manager_.get(), display_manager_.get())); 119 window_manager_.get(), display_manager_.get()));
120 platform_window->Initialize(); 120 platform_window->Initialize();
121 return platform_window.Pass(); 121 return platform_window.Pass();
122 } 122 }
123 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 123 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
124 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy( 124 return make_scoped_ptr(new NativeDisplayDelegateProxy(
125 gpu_platform_support_host_.get(), device_manager_.get(), 125 gpu_platform_support_host_.get(), device_manager_.get(),
126 display_manager_.get())); 126 display_manager_.get()));
127 } 127 }
128 void InitializeUI() override { 128 void InitializeUI() override {
129 display_manager_.reset(new DisplayManager()); 129 display_manager_.reset(new DisplayManager());
130 // Needed since the browser process creates the accelerated widgets and that 130 // Needed since the browser process creates the accelerated widgets and that
131 // happens through SFO. 131 // happens through SFO.
132 if (!surface_factory_ozone_) 132 if (!surface_factory_ozone_)
133 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 133 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
134 device_manager_ = CreateDeviceManager(); 134 device_manager_ = CreateDeviceManager();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 OzonePlatform* CreateOzonePlatformGbm() { 209 OzonePlatform* CreateOzonePlatformGbm() {
210 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 210 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
211 #if defined(USE_MESA_PLATFORM_NULL) 211 #if defined(USE_MESA_PLATFORM_NULL)
212 // Only works with surfaceless. 212 // Only works with surfaceless.
213 cmd->AppendSwitch(switches::kOzoneUseSurfaceless); 213 cmd->AppendSwitch(switches::kOzoneUseSurfaceless);
214 #endif 214 #endif
215 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 215 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
216 } 216 }
217 217
218 } // namespace ui 218 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698