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

Unified Diff: components/exo/buffer.cc

Issue 1558513002: Global conversion of Pass()→std::move() on OS=linux (GYP edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatted Created 5 years 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
« no previous file with comments | « chrome/test/nacl/pnacl_header_test.cc ('k') | components/exo/shared_memory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/buffer.cc
diff --git a/components/exo/buffer.cc b/components/exo/buffer.cc
index b79ed12060ec79f24cd750885b75fabf3ebadb89..970032638e66b54a90e102109f494bd21edd31bf 100644
--- a/components/exo/buffer.cc
+++ b/components/exo/buffer.cc
@@ -8,8 +8,8 @@
#include <GLES2/gl2ext.h>
#include <GLES2/gl2extchromium.h>
#include <stdint.h>
-
#include <algorithm>
+#include <utility>
#include "base/logging.h"
#include "base/macros.h"
@@ -154,7 +154,7 @@ void Buffer::Texture::ReleaseTexImage(const gpu::SyncToken& sync_token) {
Buffer::Buffer(scoped_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer,
unsigned texture_target)
- : gpu_memory_buffer_(gpu_memory_buffer.Pass()),
+ : gpu_memory_buffer_(std::move(gpu_memory_buffer)),
texture_target_(texture_target),
use_count_(0) {}
@@ -170,7 +170,7 @@ scoped_ptr<cc::SingleReleaseCallback> Buffer::ProduceTextureMailbox(
// Creating a new texture is relatively expensive so we reuse the last
// texture whenever possible.
- scoped_ptr<Texture> texture = last_texture_.Pass();
+ scoped_ptr<Texture> texture = std::move(last_texture_);
// If texture is lost, destroy it to ensure that we create a new one below.
if (texture && texture->IsLost())
@@ -251,7 +251,7 @@ void Buffer::ReleaseTexture(base::WeakPtr<Buffer> buffer,
// Allow buffer to reused texture if it's not lost.
if (!is_lost)
- buffer->last_texture_ = texture.Pass();
+ buffer->last_texture_ = std::move(texture);
buffer->Release();
}
« no previous file with comments | « chrome/test/nacl/pnacl_header_test.cc ('k') | components/exo/shared_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698