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

Unified Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.h

Issue 703463005: Re-land: content: Cleanup GpuMemoryBuffers when child process is removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu-memory-buffer-id-refactor
Patch Set: add manager null check to ~RenderMessageFilter 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
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_gpu_memory_buffer_manager.h
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.h b/content/browser/gpu/browser_gpu_memory_buffer_manager.h
index b5ea1482036d14956d99e7170ef74725fe6d9187..84ad9e5c0f47f08db0e9f9956b1b010da6e261d0 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.h
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.h
@@ -41,16 +41,21 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
int child_client_id,
const AllocationCallback& callback);
void ChildProcessDeletedGpuMemoryBuffer(
- gfx::GpuMemoryBufferType type,
gfx::GpuMemoryBufferId id,
base::ProcessHandle child_process_handle,
int child_client_id,
uint32 sync_point);
- void ProcessRemoved(base::ProcessHandle process_handle);
+ void ProcessRemoved(base::ProcessHandle process_handle, int client_id);
private:
struct AllocateGpuMemoryBufferRequest;
+ void GpuMemoryBufferAllocatedForChildProcess(
+ base::ProcessHandle child_process_handle,
+ int child_client_id,
+ const AllocationCallback& callback,
+ const gfx::GpuMemoryBufferHandle& handle);
+
static void AllocateGpuMemoryBufferOnIO(
AllocateGpuMemoryBufferRequest* request);
static void GpuMemoryBufferCreatedOnIO(
@@ -58,6 +63,13 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
scoped_ptr<GpuMemoryBufferImpl> buffer);
int gpu_client_id_;
+
+ typedef base::hash_map<gfx::GpuMemoryBufferId, gfx::GpuMemoryBufferType>
+ BufferMap;
+ typedef base::hash_map<int, BufferMap> ClientMap;
+ ClientMap clients_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager);
};
} // namespace content
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698