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

Unified Diff: gpu/command_buffer/client/gl_in_process_context.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/command_buffer/client/gl_in_process_context.cc
diff --git a/gpu/command_buffer/client/gl_in_process_context.cc b/gpu/command_buffer/client/gl_in_process_context.cc
index 99e4b786a0bdcbe9312bddc259358f093c175a9c..22575ecfc701033bc961cb29ed16bd403d9ba006 100644
--- a/gpu/command_buffer/client/gl_in_process_context.cc
+++ b/gpu/command_buffer/client/gl_in_process_context.cc
@@ -4,14 +4,14 @@
#include "gpu/command_buffer/client/gl_in_process_context.h"
+#include <GLES2/gl2.h>
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <set>
#include <utility>
#include <vector>
-
-#include <GLES2/gl2.h>
no sievers 2016/04/05 19:02:40 nit: can you leave GLES2/gl2.h here right above wh
Mostyn Bramley-Moore 2016/04/05 21:35:30 Done.
#ifndef GL_GLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES 1
#endif
@@ -23,7 +23,6 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "gpu/command_buffer/client/gles2_cmd_helper.h"
@@ -84,10 +83,10 @@ class GLInProcessContextImpl
void OnContextLost();
void OnSignalSyncPoint(const base::Closure& callback);
- scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_;
- scoped_ptr<TransferBuffer> transfer_buffer_;
- scoped_ptr<gles2::GLES2Implementation> gles2_implementation_;
- scoped_ptr<InProcessCommandBuffer> command_buffer_;
+ std::unique_ptr<gles2::GLES2CmdHelper> gles2_helper_;
+ std::unique_ptr<TransferBuffer> transfer_buffer_;
+ std::unique_ptr<gles2::GLES2Implementation> gles2_implementation_;
+ std::unique_ptr<InProcessCommandBuffer> command_buffer_;
const GLInProcessContextSharedMemoryLimits mem_limits_;
bool context_lost_;
@@ -134,7 +133,7 @@ void GLInProcessContextImpl::SetContextLostCallback(
}
void GLInProcessContextImpl::OnContextLost() {
- scoped_ptr<base::AutoLock> lock;
+ std::unique_ptr<base::AutoLock> lock;
if (lock_)
lock.reset(new base::AutoLock(*lock_));
context_lost_ = true;
@@ -165,7 +164,7 @@ bool GLInProcessContextImpl::Initialize(
base::Bind(&GLInProcessContextImpl::OnContextLost, AsWeakPtr());
command_buffer_.reset(new InProcessCommandBuffer(service));
- scoped_ptr<base::AutoLock> scoped_shared_context_lock;
+ std::unique_ptr<base::AutoLock> scoped_shared_context_lock;
scoped_refptr<gles2::ShareGroup> share_group;
InProcessCommandBuffer* share_command_buffer = NULL;
if (use_global_share_group) {
@@ -308,7 +307,7 @@ GLInProcessContext* GLInProcessContext::Create(
DCHECK_EQ(gfx::kNullAcceleratedWidget, window);
}
- scoped_ptr<GLInProcessContextImpl> context(
+ std::unique_ptr<GLInProcessContextImpl> context(
new GLInProcessContextImpl(memory_limits));
if (!context->Initialize(surface,
is_offscreen,

Powered by Google App Engine
This is Rietveld 408576698