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

Unified Diff: content/browser/gpu/browser_gpu_channel_host_factory.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
« no previous file with comments | « no previous file | content/common/gpu/client/gpu_memory_buffer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_gpu_channel_host_factory.cc
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
index fd2a96c8ba9737f353b48243bcff71d628c5d82c..363a4c326cd96a68467b4c1944d16f384f4e83f4 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -43,18 +43,21 @@ struct BrowserGpuChannelHostFactory::AllocateGpuMemoryBufferRequest {
AllocateGpuMemoryBufferRequest(size_t width,
size_t height,
unsigned internalformat,
- unsigned usage)
+ unsigned usage,
+ int client_id)
: event(true, false),
width(width),
height(height),
internalformat(internalformat),
- usage(usage) {}
+ usage(usage),
+ client_id(client_id) {}
~AllocateGpuMemoryBufferRequest() {}
base::WaitableEvent event;
size_t width;
size_t height;
unsigned internalformat;
unsigned usage;
+ int client_id;
scoped_ptr<gfx::GpuMemoryBuffer> result;
};
@@ -387,7 +390,8 @@ BrowserGpuChannelHostFactory::AllocateGpuMemoryBuffer(size_t width,
unsigned usage) {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
- AllocateGpuMemoryBufferRequest request(width, height, internalformat, usage);
+ AllocateGpuMemoryBufferRequest request(
+ width, height, internalformat, usage, gpu_client_id_);
GetIOLoopProxy()->PostTask(
FROM_HERE,
base::Bind(&BrowserGpuChannelHostFactory::AllocateGpuMemoryBufferOnIO,
@@ -459,6 +463,7 @@ void BrowserGpuChannelHostFactory::AllocateGpuMemoryBufferOnIO(
gfx::Size(request->width, request->height),
request->internalformat,
request->usage,
+ request->client_id,
base::Bind(&BrowserGpuChannelHostFactory::OnGpuMemoryBufferCreated,
base::Unretained(request)));
}
« no previous file with comments | « no previous file | content/common/gpu/client/gpu_memory_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698