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

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: undo part of clang-format 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 f8680781beff9246f84df2bf3e7f8de26f47858a..d882767f702a73855ce12e0efedd07da594adfea 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,30 +33,30 @@ using gpu::GLInProcessContext;
namespace gpu_blink {
// static
-scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
+std::unique_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
const gpu::gles2::ContextCreationAttribHelper& attributes,
bool share_resources) {
bool is_offscreen = true;
- return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
- scoped_ptr<::gpu::GLInProcessContext>(), attributes, share_resources,
+ return base::WrapUnique(new WebGraphicsContext3DInProcessCommandBufferImpl(
+ std::unique_ptr<::gpu::GLInProcessContext>(), attributes, share_resources,
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.
bool share_resources = false; // Not used.
gfx::AcceleratedWidget window = gfx::kNullAcceleratedWidget; // Not used.
- return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
+ return base::WrapUnique(new WebGraphicsContext3DInProcessCommandBufferImpl(
std::move(context), attributes, share_resources, is_offscreen, window));
}
WebGraphicsContext3DInProcessCommandBufferImpl::
WebGraphicsContext3DInProcessCommandBufferImpl(
- scoped_ptr<::gpu::GLInProcessContext> context,
+ std::unique_ptr<::gpu::GLInProcessContext> context,
const gpu::gles2::ContextCreationAttribHelper& attributes,
bool share_resources,
bool is_offscreen,

Powered by Google App Engine
This is Rietveld 408576698