Index: ui/ozone/platform/wayland/wayland_surface_factory.cc |
diff --git a/ui/ozone/platform/wayland/wayland_surface_factory.cc b/ui/ozone/platform/wayland/wayland_surface_factory.cc |
index f254eb4c58afe7cf04e757e772d8037ea753e033..84c1bfe8aa5a444629edf2faee0c0b3c4c202665 100644 |
--- a/ui/ozone/platform/wayland/wayland_surface_factory.cc |
+++ b/ui/ozone/platform/wayland/wayland_surface_factory.cc |
@@ -8,6 +8,7 @@ |
#include <sys/mman.h> |
#include <wayland-client.h> |
+#include "base/memory/ptr_util.h" |
#include "base/memory/shared_memory.h" |
#include "third_party/skia/include/core/SkSurface.h" |
#include "ui/gfx/vsync_provider.h" |
@@ -37,7 +38,7 @@ class WaylandCanvasSurface : public SurfaceOzoneCanvas { |
skia::RefPtr<SkSurface> GetSurface() override; |
void ResizeCanvas(const gfx::Size& viewport_size) override; |
void PresentCanvas(const gfx::Rect& damage) override; |
- scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; |
+ std::unique_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; |
private: |
WaylandDisplay* display_; |
@@ -62,7 +63,7 @@ skia::RefPtr<SkSurface> WaylandCanvasSurface::GetSurface() { |
return sk_surface_; |
size_t length = size_.width() * size_.height() * 4; |
- auto shared_memory = make_scoped_ptr(new base::SharedMemory); |
+ auto shared_memory = base::WrapUnique(new base::SharedMemory); |
if (!shared_memory->CreateAndMapAnonymous(length)) |
return nullptr; |
@@ -116,7 +117,8 @@ void WaylandCanvasSurface::PresentCanvas(const gfx::Rect& damage) { |
display_->ScheduleFlush(); |
} |
-scoped_ptr<gfx::VSyncProvider> WaylandCanvasSurface::CreateVSyncProvider() { |
+std::unique_ptr<gfx::VSyncProvider> |
+WaylandCanvasSurface::CreateVSyncProvider() { |
// TODO(forney): This can be implemented with information from frame |
// callbacks, and possibly output refresh rate. |
NOTIMPLEMENTED(); |
@@ -145,19 +147,20 @@ bool WaylandSurfaceFactory::LoadEGLGLES2Bindings( |
#endif |
} |
-scoped_ptr<SurfaceOzoneCanvas> WaylandSurfaceFactory::CreateCanvasForWidget( |
- gfx::AcceleratedWidget widget) { |
+std::unique_ptr<SurfaceOzoneCanvas> |
+WaylandSurfaceFactory::CreateCanvasForWidget(gfx::AcceleratedWidget widget) { |
WaylandWindow* window = display_->GetWindow(widget); |
DCHECK(window); |
- return make_scoped_ptr(new WaylandCanvasSurface(display_, window)); |
+ return base::WrapUnique(new WaylandCanvasSurface(display_, window)); |
} |
-scoped_ptr<SurfaceOzoneEGL> WaylandSurfaceFactory::CreateEGLSurfaceForWidget( |
+std::unique_ptr<SurfaceOzoneEGL> |
+WaylandSurfaceFactory::CreateEGLSurfaceForWidget( |
gfx::AcceleratedWidget widget) { |
#if defined(USE_WAYLAND_EGL) |
WaylandWindow* window = display_->GetWindow(widget); |
DCHECK(window); |
- auto surface = make_scoped_ptr( |
+ auto surface = base::WrapUnique( |
new WaylandEGLSurface(window, window->GetBounds().size())); |
if (!surface->Initialize()) |
return nullptr; |