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

Side by Side Diff: gpu/command_buffer/service/command_buffer_service.h

Issue 211703003: GPU: 'Pass' SharedMemory when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@GPU_ref_count_buffer
Patch Set: Rebase. Created 6 years, 9 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 (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_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "gpu/command_buffer/common/command_buffer.h" 10 #include "gpu/command_buffer/common/command_buffer.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // Setup the shared memory that shared state should be copied into. 58 // Setup the shared memory that shared state should be copied into.
59 bool SetSharedStateBuffer(scoped_ptr<base::SharedMemory> shared_state_shm); 59 bool SetSharedStateBuffer(scoped_ptr<base::SharedMemory> shared_state_shm);
60 60
61 // Copy the current state into the shared state transfer buffer. 61 // Copy the current state into the shared state transfer buffer.
62 void UpdateState(); 62 void UpdateState();
63 63
64 // Register an existing shared memory object and get an ID that can be used 64 // Register an existing shared memory object and get an ID that can be used
65 // to identify it in the command buffer. Callee dups the handle until 65 // to identify it in the command buffer. Callee dups the handle until
66 // DestroyTransferBuffer is called. 66 // DestroyTransferBuffer is called.
67 bool RegisterTransferBuffer(int32 id, 67 bool RegisterTransferBuffer(int32 id,
68 base::SharedMemory* shared_memory, 68 scoped_ptr<base::SharedMemory> shared_memory,
69 size_t size); 69 size_t size);
70 70
71 private: 71 private:
72 int32 ring_buffer_id_; 72 int32 ring_buffer_id_;
73 scoped_refptr<Buffer> ring_buffer_; 73 scoped_refptr<Buffer> ring_buffer_;
74 scoped_ptr<base::SharedMemory> shared_state_shm_; 74 scoped_ptr<base::SharedMemory> shared_state_shm_;
75 CommandBufferSharedState* shared_state_; 75 CommandBufferSharedState* shared_state_;
76 int32 num_entries_; 76 int32 num_entries_;
77 int32 get_offset_; 77 int32 get_offset_;
78 int32 put_offset_; 78 int32 put_offset_;
79 base::Closure put_offset_change_callback_; 79 base::Closure put_offset_change_callback_;
80 GetBufferChangedCallback get_buffer_change_callback_; 80 GetBufferChangedCallback get_buffer_change_callback_;
81 base::Closure parse_error_callback_; 81 base::Closure parse_error_callback_;
82 TransferBufferManagerInterface* transfer_buffer_manager_; 82 TransferBufferManagerInterface* transfer_buffer_manager_;
83 int32 token_; 83 int32 token_;
84 uint32 generation_; 84 uint32 generation_;
85 error::Error error_; 85 error::Error error_;
86 error::ContextLostReason context_lost_reason_; 86 error::ContextLostReason context_lost_reason_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(CommandBufferService); 88 DISALLOW_COPY_AND_ASSIGN(CommandBufferService);
89 }; 89 };
90 90
91 } // namespace gpu 91 } // namespace gpu
92 92
93 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ 93 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/buffer.cc ('k') | gpu/command_buffer/service/command_buffer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698