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

Side by Side Diff: gpu/ipc/client/command_buffer_proxy_impl.h

Issue 2041043002: CommandBufferProxyImpl holds on to GpuMemoryBuffers while they are in use. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | gpu/ipc/client/command_buffer_proxy_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 5 #ifndef GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 gpu::Capabilities capabilities_; 292 gpu::Capabilities capabilities_;
293 293
294 std::vector<ui::LatencyInfo> latency_info_; 294 std::vector<ui::LatencyInfo> latency_info_;
295 295
296 SwapBuffersCompletionCallback swap_buffers_completion_callback_; 296 SwapBuffersCompletionCallback swap_buffers_completion_callback_;
297 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; 297 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_;
298 298
299 // A map from image id to GpuMemoryBuffer id. 299 // A map from image id to GpuMemoryBuffer id.
300 std::map<int32_t, int32_t> image_gmb_ids_map_; 300 std::map<int32_t, int32_t> image_gmb_ids_map_;
301 301
302 // A map of GpuMemoryBuffers owned by this class (created from
303 // CreateGpuMemoryBufferImage). Unfortunatley, this cannot be combined with
304 // |image_gmb_ids_map_| since that container does not imply ownership.
piman 2016/06/06 19:28:52 nit: would it be possible to combine both maps, by
erikchen 2016/06/06 21:55:54 I created the ImageInfo struct as you suggested.
305 std::map<int32_t, std::unique_ptr<gfx::GpuMemoryBuffer>> image_gmb_map_;
306
302 base::WeakPtr<CommandBufferProxyImpl> weak_this_; 307 base::WeakPtr<CommandBufferProxyImpl> weak_this_;
303 scoped_refptr<base::SequencedTaskRunner> callback_thread_; 308 scoped_refptr<base::SequencedTaskRunner> callback_thread_;
304 309
305 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 310 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
306 }; 311 };
307 312
308 } // namespace gpu 313 } // namespace gpu
309 314
310 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 315 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/ipc/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698