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

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

Issue 741253002: Add AcceleratedWidget to native pixmap allocation to specify which display controller to create the… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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_factory.h ('k') | ui/ozone/public/surface_factory_ozone.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/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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget( 161 GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget(
162 gfx::AcceleratedWidget widget) { 162 gfx::AcceleratedWidget widget) {
163 if (!allow_surfaceless_) 163 if (!allow_surfaceless_)
164 return scoped_ptr<SurfaceOzoneEGL>(); 164 return scoped_ptr<SurfaceOzoneEGL>();
165 165
166 DriWindowDelegate* delegate = GetOrCreateWindowDelegate(widget); 166 DriWindowDelegate* delegate = GetOrCreateWindowDelegate(widget);
167 return scoped_ptr<SurfaceOzoneEGL>(new GbmSurfaceless(delegate)); 167 return scoped_ptr<SurfaceOzoneEGL>(new GbmSurfaceless(delegate));
168 } 168 }
169 169
170 scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap( 170 scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap(
171 gfx::AcceleratedWidget widget,
171 gfx::Size size, 172 gfx::Size size,
172 BufferFormat format, 173 BufferFormat format,
173 BufferUsage usage) { 174 BufferUsage usage) {
174 if (usage == MAP) 175 if (usage == MAP)
175 return NULL; 176 return NULL;
176 177
177 scoped_refptr<GbmBuffer> buffer = 178 scoped_refptr<GbmBuffer> buffer =
178 GbmBuffer::CreateBuffer(drm_, device_, format, size, true); 179 GbmBuffer::CreateBuffer(drm_, device_, format, size, true);
179 if (!buffer.get()) 180 if (!buffer.get())
180 return NULL; 181 return NULL;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 scoped_ptr<DriWindowDelegate> delegate( 241 scoped_ptr<DriWindowDelegate> delegate(
241 new DriWindowDelegateImpl(widget, screen_manager_)); 242 new DriWindowDelegateImpl(widget, screen_manager_));
242 delegate->Initialize(); 243 delegate->Initialize();
243 window_manager_->AddWindowDelegate(widget, delegate.Pass()); 244 window_manager_->AddWindowDelegate(widget, delegate.Pass());
244 } 245 }
245 246
246 return window_manager_->GetWindowDelegate(widget); 247 return window_manager_->GetWindowDelegate(widget);
247 } 248 }
248 249
249 } // namespace ui 250 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.h ('k') | ui/ozone/public/surface_factory_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698