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

Side by Side Diff: gpu/ipc/in_process_command_buffer.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
« no previous file with comments | « gpu/ipc/common/gpu_surface_tracker.h ('k') | media/renderers/gpu_video_accelerator_factories.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/in_process_command_buffer.h" 5 #include "gpu/ipc/in_process_command_buffer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 862
863 int32_t InProcessCommandBuffer::CreateGpuMemoryBufferImage( 863 int32_t InProcessCommandBuffer::CreateGpuMemoryBufferImage(
864 size_t width, 864 size_t width,
865 size_t height, 865 size_t height,
866 unsigned internalformat, 866 unsigned internalformat,
867 unsigned usage) { 867 unsigned usage) {
868 CheckSequencedThread(); 868 CheckSequencedThread();
869 869
870 DCHECK(gpu_memory_buffer_manager_); 870 DCHECK(gpu_memory_buffer_manager_);
871 std::unique_ptr<gfx::GpuMemoryBuffer> buffer( 871 std::unique_ptr<gfx::GpuMemoryBuffer> buffer(
872 gpu_memory_buffer_manager_->AllocateGpuMemoryBuffer( 872 gpu_memory_buffer_manager_->CreateGpuMemoryBuffer(
873 gfx::Size(base::checked_cast<int>(width), 873 gfx::Size(base::checked_cast<int>(width),
874 base::checked_cast<int>(height)), 874 base::checked_cast<int>(height)),
875 gpu::DefaultBufferFormatForImageFormat(internalformat), 875 gpu::DefaultBufferFormatForImageFormat(internalformat),
876 gfx::BufferUsage::SCANOUT, gpu::kNullSurfaceHandle)); 876 gfx::BufferUsage::SCANOUT, gpu::kNullSurfaceHandle));
877 if (!buffer) 877 if (!buffer)
878 return -1; 878 return -1;
879 879
880 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); 880 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat);
881 } 881 }
882 882
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 return wrapped_callback; 1176 return wrapped_callback;
1177 } 1177 }
1178 1178
1179 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, 1179 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback,
1180 uint32_t order_number) 1180 uint32_t order_number)
1181 : callback(callback), order_number(order_number) {} 1181 : callback(callback), order_number(order_number) {}
1182 1182
1183 InProcessCommandBuffer::GpuTask::~GpuTask() {} 1183 InProcessCommandBuffer::GpuTask::~GpuTask() {}
1184 1184
1185 } // namespace gpu 1185 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/common/gpu_surface_tracker.h ('k') | media/renderers/gpu_video_accelerator_factories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698