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

Side by Side Diff: ui/ozone/platform/wayland/wayland_surface_factory.cc

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/wayland/wayland_surface_factory.h" 5 #include "ui/ozone/platform/wayland/wayland_surface_factory.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/mman.h> 8 #include <sys/mman.h>
9 #include <wayland-client.h> 9 #include <wayland-client.h>
10 10
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address); 182 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address);
183 #else 183 #else
184 return false; 184 return false;
185 #endif 185 #endif
186 } 186 }
187 187
188 std::unique_ptr<SurfaceOzoneCanvas> 188 std::unique_ptr<SurfaceOzoneCanvas>
189 WaylandSurfaceFactory::CreateCanvasForWidget(gfx::AcceleratedWidget widget) { 189 WaylandSurfaceFactory::CreateCanvasForWidget(gfx::AcceleratedWidget widget) {
190 WaylandWindow* window = connection_->GetWindow(widget); 190 WaylandWindow* window = connection_->GetWindow(widget);
191 DCHECK(window); 191 DCHECK(window);
192 return base::WrapUnique(new WaylandCanvasSurface(connection_, window)); 192 return base::MakeUnique<WaylandCanvasSurface>(connection_, window);
193 } 193 }
194 194
195 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmap( 195 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmap(
196 gfx::AcceleratedWidget widget, 196 gfx::AcceleratedWidget widget,
197 gfx::Size size, 197 gfx::Size size,
198 gfx::BufferFormat format, 198 gfx::BufferFormat format,
199 gfx::BufferUsage usage) { 199 gfx::BufferUsage usage) {
200 NOTIMPLEMENTED(); 200 NOTIMPLEMENTED();
201 return nullptr; 201 return nullptr;
202 } 202 }
203 203
204 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmapFromHandle( 204 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmapFromHandle(
205 gfx::AcceleratedWidget widget, 205 gfx::AcceleratedWidget widget,
206 gfx::Size size, 206 gfx::Size size,
207 gfx::BufferFormat format, 207 gfx::BufferFormat format,
208 const gfx::NativePixmapHandle& handle) { 208 const gfx::NativePixmapHandle& handle) {
209 NOTIMPLEMENTED(); 209 NOTIMPLEMENTED();
210 return nullptr; 210 return nullptr;
211 } 211 }
212 212
213 } // namespace ui 213 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_connection.cc ('k') | ui/ozone/platform/x11/ozone_platform_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698