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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc
index 399e6c2c9157b5a1ac86851a1313722add54d30c..62e722de8e6de384c7a11753d8d786162894e0f0 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc
@@ -39,12 +39,11 @@ void GpuMemoryBufferImplOzoneNativeBuffer::Create(
const gfx::Size& size,
unsigned internalformat,
unsigned usage,
+ int client_id,
const CreationCallback& callback) {
gfx::GpuMemoryBufferHandle handle;
handle.global_id.primary_id = g_next_buffer_id.GetNext();
- // This code makes an assumption that client_id for GPU channel using this
- // buffer is zero.
- handle.global_id.secondary_id = 0;
+ handle.global_id.secondary_id = client_id;
handle.type = gfx::OZONE_NATIVE_BUFFER;
GpuMemoryBufferFactoryHost::GetInstance()->CreateGpuMemoryBuffer(
handle,
@@ -59,11 +58,11 @@ void GpuMemoryBufferImplOzoneNativeBuffer::AllocateOzoneNativeBufferForChildId(
const gfx::Size& size,
unsigned internalformat,
unsigned usage,
- int child_id,
+ int child_client_id,
const AllocationCallback& callback) {
gfx::GpuMemoryBufferHandle handle;
handle.global_id.primary_id = g_next_buffer_id.GetNext();
- handle.global_id.secondary_id = child_id;
+ handle.global_id.secondary_id = child_client_id;
handle.type = gfx::OZONE_NATIVE_BUFFER;
GpuMemoryBufferFactoryHost::GetInstance()->CreateGpuMemoryBuffer(
handle,

Powered by Google App Engine
This is Rietveld 408576698