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

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
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..58fe23ec1d8086057ad1c9df53a09b50ef8beb54 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 gpu_client_id)
: event(true, false),
width(width),
height(height),
internalformat(internalformat),
- usage(usage) {}
+ usage(usage),
+ gpu_client_id(gpu_client_id) {}
~AllocateGpuMemoryBufferRequest() {}
base::WaitableEvent event;
size_t width;
size_t height;
unsigned internalformat;
unsigned usage;
+ int gpu_client_id;
reveman 2014/09/10 16:10:13 nit: s/gpu_client_id/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->gpu_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') | content/common/gpu/client/gpu_memory_buffer_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698