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

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

Issue 557353002: Remove the assumption about client_id from gpu memory buffer allocation on the browser side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 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 "content/common/gpu/client/gpu_memory_buffer_impl.h" 5 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
6 6
7 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" 7 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
8 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" 8 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // static 12 // static
13 void GpuMemoryBufferImpl::Create(const gfx::Size& size, 13 void GpuMemoryBufferImpl::Create(const gfx::Size& size,
14 unsigned internalformat, 14 unsigned internalformat,
15 unsigned usage, 15 unsigned usage,
16 int gpu_client_id,
16 const CreationCallback& callback) { 17 const CreationCallback& callback) {
17 if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported( 18 if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
18 size, internalformat, usage)) { 19 size, internalformat, usage)) {
19 GpuMemoryBufferImplSharedMemory::Create( 20 GpuMemoryBufferImplSharedMemory::Create(
20 size, internalformat, usage, callback); 21 size, internalformat, usage, callback);
21 return; 22 return;
22 } 23 }
23 24
24 callback.Run(scoped_ptr<GpuMemoryBufferImpl>()); 25 callback.Run(scoped_ptr<GpuMemoryBufferImpl>());
25 } 26 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return scoped_ptr<GpuMemoryBufferImpl>(); 71 return scoped_ptr<GpuMemoryBufferImpl>();
71 72
72 return buffer.PassAs<GpuMemoryBufferImpl>(); 73 return buffer.PassAs<GpuMemoryBufferImpl>();
73 } 74 }
74 default: 75 default:
75 return scoped_ptr<GpuMemoryBufferImpl>(); 76 return scoped_ptr<GpuMemoryBufferImpl>();
76 } 77 }
77 } 78 }
78 79
79 } // namespace content 80 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698