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

Side by Side Diff: gpu/ipc/client/command_buffer_proxy_impl.cc

Issue 2526683002: gpu: Rename AllocateGpuMemoryBuffer to CreateGpuMemoryBuffer. (Closed)
Patch Set: . Created 4 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 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 "gpu/ipc/client/command_buffer_proxy_impl.h" 5 #include "gpu/ipc/client/command_buffer_proxy_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 Send(new GpuCommandBufferMsg_DestroyImage(route_id_, id)); 515 Send(new GpuCommandBufferMsg_DestroyImage(route_id_, id));
516 } 516 }
517 517
518 int32_t CommandBufferProxyImpl::CreateGpuMemoryBufferImage( 518 int32_t CommandBufferProxyImpl::CreateGpuMemoryBufferImage(
519 size_t width, 519 size_t width,
520 size_t height, 520 size_t height,
521 unsigned internal_format, 521 unsigned internal_format,
522 unsigned usage) { 522 unsigned usage) {
523 CheckLock(); 523 CheckLock();
524 std::unique_ptr<gfx::GpuMemoryBuffer> buffer( 524 std::unique_ptr<gfx::GpuMemoryBuffer> buffer(
525 channel_->gpu_memory_buffer_manager()->AllocateGpuMemoryBuffer( 525 channel_->gpu_memory_buffer_manager()->CreateGpuMemoryBuffer(
526 gfx::Size(width, height), 526 gfx::Size(width, height),
527 gpu::DefaultBufferFormatForImageFormat(internal_format), 527 gpu::DefaultBufferFormatForImageFormat(internal_format),
528 gfx::BufferUsage::SCANOUT, gpu::kNullSurfaceHandle)); 528 gfx::BufferUsage::SCANOUT, gpu::kNullSurfaceHandle));
529 if (!buffer) 529 if (!buffer)
530 return -1; 530 return -1;
531 531
532 int32_t result = 532 int32_t result =
533 CreateImage(buffer->AsClientBuffer(), width, height, internal_format); 533 CreateImage(buffer->AsClientBuffer(), width, height, internal_format);
534 return result; 534 return result;
535 } 535 }
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 return; 866 return;
867 channel_->FlushPendingStream(stream_id_); 867 channel_->FlushPendingStream(stream_id_);
868 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); 868 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_));
869 channel_->RemoveRoute(route_id_); 869 channel_->RemoveRoute(route_id_);
870 channel_ = nullptr; 870 channel_ = nullptr;
871 if (gpu_control_client_) 871 if (gpu_control_client_)
872 gpu_control_client_->OnGpuControlLostContext(); 872 gpu_control_client_->OnGpuControlLostContext();
873 } 873 }
874 874
875 } // namespace gpu 875 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gpu_memory_buffer_manager.h ('k') | gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698