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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl.h

Issue 290573011: Delay the response to ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer via a callback to allow for b… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 years, 7 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.h
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.h b/content/common/gpu/client/gpu_memory_buffer_impl.h
index af72599c7f2c7b1eb01a23a85db02e00e576ceac..9ab473568dd4b5c14bfd0604bf6455ddeabd0c51 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.h
@@ -5,12 +5,16 @@
#ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_H_
#define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_H_
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/size.h"
namespace content {
+typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
+ AllocationCallback;
reveman 2014/05/19 18:57:57 nit: I think this should be in the GpuMemoryBuffer
+
// Provides common implementation of a GPU memory buffer.
class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
public:
@@ -29,7 +33,7 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
unsigned internalformat,
unsigned usage,
base::ProcessHandle child_process,
- gfx::GpuMemoryBufferHandle* handle);
+ const AllocationCallback& callback);
// Creates an instance from the given |handle|. |size| and |internalformat|
// should match what was used to allocate the |handle|.

Powered by Google App Engine
This is Rietveld 408576698