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

Unified Diff: gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: convert newly added scoped_ptr's Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
diff --git a/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc b/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
index de925a59f79c7c229234013053bd09c2a1ee906a..d58e26ef2f773790a61a4e2dfd98470aa82056bf 100644
--- a/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -20,6 +20,7 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
@@ -32,28 +33,28 @@ using gpu::GLInProcessContext;
namespace gpu_blink {
// static
-scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
+std::unique_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
const gpu::gles2::ContextCreationAttribHelper& attributes) {
bool is_offscreen = true;
- return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
- scoped_ptr<::gpu::GLInProcessContext>(), attributes, is_offscreen,
+ return base::WrapUnique(new WebGraphicsContext3DInProcessCommandBufferImpl(
+ std::unique_ptr<::gpu::GLInProcessContext>(), attributes, is_offscreen,
gfx::kNullAcceleratedWidget));
}
-scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
+std::unique_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext(
- scoped_ptr<::gpu::GLInProcessContext> context,
+ std::unique_ptr<::gpu::GLInProcessContext> context,
const gpu::gles2::ContextCreationAttribHelper& attributes) {
bool is_offscreen = true; // Not used.
gfx::AcceleratedWidget window = gfx::kNullAcceleratedWidget; // Not used.
- return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
+ return base::WrapUnique(new WebGraphicsContext3DInProcessCommandBufferImpl(
std::move(context), attributes, is_offscreen, window));
}
WebGraphicsContext3DInProcessCommandBufferImpl::
WebGraphicsContext3DInProcessCommandBufferImpl(
- scoped_ptr<::gpu::GLInProcessContext> context,
+ std::unique_ptr<::gpu::GLInProcessContext> context,
const gpu::gles2::ContextCreationAttribHelper& attributes,
bool is_offscreen,
gfx::AcceleratedWidget window)

Powered by Google App Engine
This is Rietveld 408576698