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

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

Issue 2963813002: gpu: Use a local int to generate the gmb id. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 GpuProcessHost::BufferCreationStatus status); 116 GpuProcessHost::BufferCreationStatus status);
117 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, 117 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id,
118 int client_id, 118 int client_id,
119 const gpu::SyncToken& sync_token); 119 const gpu::SyncToken& sync_token);
120 120
121 uint64_t ClientIdToTracingProcessId(int client_id) const; 121 uint64_t ClientIdToTracingProcessId(int client_id) const;
122 122
123 const gpu::GpuMemoryBufferConfigurationSet native_configurations_; 123 const gpu::GpuMemoryBufferConfigurationSet native_configurations_;
124 const int gpu_client_id_; 124 const int gpu_client_id_;
125 const uint64_t gpu_client_tracing_id_; 125 const uint64_t gpu_client_tracing_id_;
126 int next_gpu_memory_id_ = 1;
126 127
127 // Stores info about buffers for all clients. This should only be accessed 128 // Stores info about buffers for all clients. This should only be accessed
128 // on the IO thread. 129 // on the IO thread.
129 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; 130 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
130 using ClientMap = base::hash_map<int, BufferMap>; 131 using ClientMap = base::hash_map<int, BufferMap>;
131 ClientMap clients_; 132 ClientMap clients_;
132 133
133 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); 134 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager);
134 }; 135 };
135 136
136 } // namespace content 137 } // namespace content
137 138
138 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 139 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« 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