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

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

Issue 685983005: gpu: Associate all GpuMemoryBuffers with unique IDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more ozone build fix Created 6 years, 1 month 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 dbfd519471d5e3285be874f247037295e9238400..52d5aef10953f055608afea1105682fa6c57e7aa 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.h
@@ -25,7 +25,8 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
// Creates a GPU memory buffer instance with |size| and |format| for |usage|
// by the current process and |client_id|.
- static void Create(const gfx::Size& size,
+ static void Create(gfx::GpuMemoryBufferId id,
+ const gfx::Size& size,
Format format,
Usage usage,
int client_id,
@@ -34,7 +35,8 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
// Allocates a GPU memory buffer with |size| and |internalformat| for |usage|
// by |child_process| and |child_client_id|. The |handle| returned can be
// used by the |child_process| to create an instance of this class.
- static void AllocateForChildProcess(const gfx::Size& size,
+ static void AllocateForChildProcess(gfx::GpuMemoryBufferId id,
+ const gfx::Size& size,
Format format,
Usage usage,
base::ProcessHandle child_process,
@@ -43,7 +45,7 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
// Notify that GPU memory buffer has been deleted by |child_process|.
static void DeletedByChildProcess(gfx::GpuMemoryBufferType type,
- const gfx::GpuMemoryBufferId& id,
+ gfx::GpuMemoryBufferId id,
base::ProcessHandle child_process,
int child_client_id,
uint32 sync_point);
@@ -75,10 +77,12 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
}
protected:
- GpuMemoryBufferImpl(const gfx::Size& size,
+ GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id,
+ const gfx::Size& size,
Format format,
const DestructionCallback& callback);
+ const gfx::GpuMemoryBufferId id_;
const gfx::Size size_;
const Format format_;
const DestructionCallback callback_;
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_factory_host.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698