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

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

Issue 458313002: Browser side OZONE_NATIVE_BUFFER allocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 2565c02653a71a4ac1a0b46a991dd4154839d95b..362b0bd2c9bd8b20b6d72d98371501a8885fe1f0 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.h
@@ -11,6 +11,7 @@
#include "ui/gfx/size.h"
namespace content {
+class GpuMemoryBufferFactoryHost;
// Provides common implementation of a GPU memory buffer.
class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
@@ -29,10 +30,14 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
// Allocates a GPU memory buffer with |size| and |internalformat| for |usage|
// by |child_process|. The |handle| returned can be used by the
// |child_process| to create an instance of this class.
+ // The buffer is being allocated for |child_id| and |factory_host| can
+ // be used to talk to the allocator.
reveman 2014/08/13 08:03:11 Can you merge the mention of |child_id| with the t
achaulk 2014/08/13 15:53:19 Done.
static void AllocateForChildProcess(const gfx::Size& size,
unsigned internalformat,
unsigned usage,
base::ProcessHandle child_process,
+ int child_id,
+ GpuMemoryBufferFactoryHost* factory_host,
reveman 2014/08/13 08:03:11 It's weird that we pass a factory to this function
achaulk 2014/08/13 15:53:19 Sure, I can do that. The only implementation is a
const AllocationCallback& callback);
// Notify that GPU memory buffer has been deleted by |child_process|.

Powered by Google App Engine
This is Rietveld 408576698