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

Side by Side Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.h

Issue 1280513002: Add GenericSharedMemoryId and use w/ GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trackpools
Patch Set: Comments and tweaks. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // Overridden from base::trace_event::MemoryDumpProvider: 44 // Overridden from base::trace_event::MemoryDumpProvider:
45 bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override; 45 bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override;
46 46
47 // Virtual for testing. 47 // Virtual for testing.
48 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout( 48 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout(
49 const gfx::Size& size, 49 const gfx::Size& size,
50 gfx::BufferFormat format, 50 gfx::BufferFormat format,
51 int32 surface_id); 51 int32 surface_id);
52 52
53 void AllocateGpuMemoryBufferForChildProcess( 53 void AllocateGpuMemoryBufferForChildProcess(
54 gfx::GpuMemoryBufferId id,
54 const gfx::Size& size, 55 const gfx::Size& size,
55 gfx::BufferFormat format, 56 gfx::BufferFormat format,
56 gfx::BufferUsage usage, 57 gfx::BufferUsage usage,
57 base::ProcessHandle child_process_handle, 58 base::ProcessHandle child_process_handle,
58 int child_client_id, 59 int child_client_id,
59 const AllocationCallback& callback); 60 const AllocationCallback& callback);
60 void ChildProcessDeletedGpuMemoryBuffer( 61 void ChildProcessDeletedGpuMemoryBuffer(
61 gfx::GpuMemoryBufferId id, 62 gfx::GpuMemoryBufferId id,
62 base::ProcessHandle child_process_handle, 63 base::ProcessHandle child_process_handle,
63 int child_client_id, 64 int child_client_id,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; 138 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
138 using ClientMap = base::hash_map<int, BufferMap>; 139 using ClientMap = base::hash_map<int, BufferMap>;
139 ClientMap clients_; 140 ClientMap clients_;
140 141
141 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); 142 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager);
142 }; 143 };
143 144
144 } // namespace content 145 } // namespace content
145 146
146 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 147 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698