OLD | NEW |
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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 gfx::GpuMemoryBufferId id, | 62 gfx::GpuMemoryBufferId id, |
63 int child_client_id, | 63 int child_client_id, |
64 const gpu::SyncToken& sync_token); | 64 const gpu::SyncToken& sync_token); |
65 void ProcessRemoved(int client_id); | 65 void ProcessRemoved(int client_id); |
66 | 66 |
67 bool IsNativeGpuMemoryBufferConfiguration(gfx::BufferFormat format, | 67 bool IsNativeGpuMemoryBufferConfiguration(gfx::BufferFormat format, |
68 gfx::BufferUsage usage) const; | 68 gfx::BufferUsage usage) const; |
69 | 69 |
70 private: | 70 private: |
71 struct BufferInfo { | 71 struct BufferInfo { |
72 BufferInfo(); | |
73 BufferInfo(const gfx::Size& size, | 72 BufferInfo(const gfx::Size& size, |
74 gfx::GpuMemoryBufferType type, | 73 gfx::GpuMemoryBufferType type, |
75 gfx::BufferFormat format, | 74 gfx::BufferFormat format, |
76 gfx::BufferUsage usage, | 75 gfx::BufferUsage usage, |
77 int gpu_host_id); | 76 int gpu_host_id); |
78 BufferInfo(const BufferInfo& other); | 77 BufferInfo(const BufferInfo& other); |
79 ~BufferInfo(); | 78 ~BufferInfo(); |
80 | 79 |
81 gfx::Size size; | 80 gfx::Size size; |
82 gfx::GpuMemoryBufferType type = gfx::EMPTY_BUFFER; | 81 gfx::GpuMemoryBufferType type = gfx::EMPTY_BUFFER; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; | 128 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; |
130 using ClientMap = base::hash_map<int, BufferMap>; | 129 using ClientMap = base::hash_map<int, BufferMap>; |
131 ClientMap clients_; | 130 ClientMap clients_; |
132 | 131 |
133 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); | 132 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); |
134 }; | 133 }; |
135 | 134 |
136 } // namespace content | 135 } // namespace content |
137 | 136 |
138 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ | 137 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ |
OLD | NEW |