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

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: Use default move constructor and move operator=. 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 uint32_t next_signal_id_; 289 uint32_t next_signal_id_;
290 SignalTaskMap signal_tasks_; 290 SignalTaskMap signal_tasks_;
291 291
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 // |gpu_memory_buffer_id| will always contain a valid (not -1) id.
300 std::map<int32_t, int32_t> image_gmb_ids_map_; 300 // If the GpuMemoryBuffer was created through this class, then
301 // |owned_gpu_memory_buffer| will also be not null.
302 struct ImageInfo {
303 ImageInfo();
304 ~ImageInfo();
305 ImageInfo(ImageInfo&& other);
306 ImageInfo& operator=(ImageInfo&& other);
307 int32_t gpu_memory_buffer_id = -1;
308 std::unique_ptr<gfx::GpuMemoryBuffer> owned_gpu_memory_buffer;
309 };
310 // A map from image id to ImageInfo.
311 std::map<int32_t, ImageInfo> image_gmb_map_;
301 312
302 base::WeakPtr<CommandBufferProxyImpl> weak_this_; 313 base::WeakPtr<CommandBufferProxyImpl> weak_this_;
303 scoped_refptr<base::SequencedTaskRunner> callback_thread_; 314 scoped_refptr<base::SequencedTaskRunner> callback_thread_;
304 315
305 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 316 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
306 }; 317 };
307 318
308 } // namespace gpu 319 } // namespace gpu
309 320
310 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 321 #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