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

Side by Side Diff: content/common/gpu/client/command_buffer_proxy_impl.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/gpu/client/command_buffer_proxy_impl.h" 5 #include "content/common/gpu/client/command_buffer_proxy_impl.h"
6 6
7 #include <utility>
7 #include <vector> 8 #include <vector>
8 9
9 #include "base/callback.h" 10 #include "base/callback.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/memory/shared_memory.h" 12 #include "base/memory/shared_memory.h"
12 #include "base/stl_util.h" 13 #include "base/stl_util.h"
13 #include "base/trace_event/trace_event.h" 14 #include "base/trace_event/trace_event.h"
14 #include "content/common/child_process_messages.h" 15 #include "content/common/child_process_messages.h"
15 #include "content/common/gpu/client/gpu_channel_host.h" 16 #include "content/common/gpu/client/gpu_channel_host.h"
16 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" 17 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 377
377 if (!Send(new GpuCommandBufferMsg_RegisterTransferBuffer(route_id_, 378 if (!Send(new GpuCommandBufferMsg_RegisterTransferBuffer(route_id_,
378 new_id, 379 new_id,
379 handle, 380 handle,
380 size))) { 381 size))) {
381 return NULL; 382 return NULL;
382 } 383 }
383 384
384 *id = new_id; 385 *id = new_id;
385 scoped_refptr<gpu::Buffer> buffer( 386 scoped_refptr<gpu::Buffer> buffer(
386 gpu::MakeBufferFromSharedMemory(shared_memory.Pass(), size)); 387 gpu::MakeBufferFromSharedMemory(std::move(shared_memory), size));
387 return buffer; 388 return buffer;
388 } 389 }
389 390
390 void CommandBufferProxyImpl::DestroyTransferBuffer(int32_t id) { 391 void CommandBufferProxyImpl::DestroyTransferBuffer(int32_t id) {
391 CheckLock(); 392 CheckLock();
392 if (last_state_.error != gpu::error::kNoError) 393 if (last_state_.error != gpu::error::kNoError)
393 return; 394 return;
394 395
395 Send(new GpuCommandBufferMsg_DestroyTransferBuffer(route_id_, id)); 396 Send(new GpuCommandBufferMsg_DestroyTransferBuffer(route_id_, id));
396 } 397 }
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 } 768 }
768 } 769 }
769 770
770 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase, 771 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase,
771 base::TimeDelta interval) { 772 base::TimeDelta interval) {
772 if (!update_vsync_parameters_completion_callback_.is_null()) 773 if (!update_vsync_parameters_completion_callback_.is_null())
773 update_vsync_parameters_completion_callback_.Run(timebase, interval); 774 update_vsync_parameters_completion_callback_.Run(timebase, interval);
774 } 775 }
775 776
776 } // namespace content 777 } // namespace content
OLDNEW
« no previous file with comments | « content/common/font_list_pango.cc ('k') | content/common/gpu/client/context_provider_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698