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

Side by Side Diff: components/exo/shared_memory.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 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « components/exo/buffer.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/exo/shared_memory.h" 5 #include "components/exo/shared_memory.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility>
8 9
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/trace_event/trace_event.h" 11 #include "base/trace_event/trace_event.h"
11 #include "components/exo/buffer.h" 12 #include "components/exo/buffer.h"
12 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 13 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
13 #include "third_party/khronos/GLES2/gl2.h" 14 #include "third_party/khronos/GLES2/gl2.h"
14 #include "ui/aura/env.h" 15 #include "ui/aura/env.h"
15 #include "ui/compositor/compositor.h" 16 #include "ui/compositor/compositor.h"
16 #include "ui/gfx/buffer_format_util.h" 17 #include "ui/gfx/buffer_format_util.h"
17 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 scoped_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer = 69 scoped_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer =
69 aura::Env::GetInstance() 70 aura::Env::GetInstance()
70 ->context_factory() 71 ->context_factory()
71 ->GetGpuMemoryBufferManager() 72 ->GetGpuMemoryBufferManager()
72 ->CreateGpuMemoryBufferFromHandle(handle, size, format); 73 ->CreateGpuMemoryBufferFromHandle(handle, size, format);
73 if (!gpu_memory_buffer) { 74 if (!gpu_memory_buffer) {
74 LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle"; 75 LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle";
75 return nullptr; 76 return nullptr;
76 } 77 }
77 78
78 return make_scoped_ptr(new Buffer(gpu_memory_buffer.Pass(), GL_TEXTURE_2D)); 79 return make_scoped_ptr(
80 new Buffer(std::move(gpu_memory_buffer), GL_TEXTURE_2D));
79 } 81 }
80 82
81 } // namespace exo 83 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/buffer.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698