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

Side by Side Diff: mojo/gles2/command_buffer_client_impl.h

Issue 221453007: mojo/gpu: use SharedBuffer instead of base::SharedMemory with hacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missing include Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | mojo/gles2/command_buffer_client_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 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 MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ 5 #ifndef MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_
6 #define MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ 6 #define MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/shared_memory.h"
13 #include "gpu/command_buffer/common/command_buffer.h" 12 #include "gpu/command_buffer/common/command_buffer.h"
14 #include "gpu/command_buffer/common/command_buffer_shared.h" 13 #include "gpu/command_buffer/common/command_buffer_shared.h"
15 #include "gpu/command_buffer/common/gpu_control.h" 14 #include "gpu/command_buffer/common/gpu_control.h"
16 #include "mojo/public/cpp/bindings/error_handler.h" 15 #include "mojo/public/cpp/bindings/error_handler.h"
17 #include "mojo/public/cpp/bindings/remote_ptr.h" 16 #include "mojo/public/cpp/bindings/remote_ptr.h"
18 #include "mojo/services/gles2/command_buffer.mojom.h" 17 #include "mojo/services/gles2/command_buffer.mojom.h"
19 18
20 namespace base { 19 namespace base {
21 class RunLoop; 20 class RunLoop;
22 } 21 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 virtual void LostContext(int32_t lost_reason) OVERRIDE; 88 virtual void LostContext(int32_t lost_reason) OVERRIDE;
90 89
91 // ErrorHandler implementation: 90 // ErrorHandler implementation:
92 virtual void OnError() OVERRIDE; 91 virtual void OnError() OVERRIDE;
93 92
94 virtual void DrawAnimationFrame() OVERRIDE; 93 virtual void DrawAnimationFrame() OVERRIDE;
95 94
96 void TryUpdateState(); 95 void TryUpdateState();
97 void MakeProgressAndUpdateState(); 96 void MakeProgressAndUpdateState();
98 97
99 gpu::CommandBufferSharedState* shared_state() const { 98 gpu::CommandBufferSharedState* shared_state() const { return shared_state_; }
100 return reinterpret_cast<gpu::CommandBufferSharedState*>(
101 shared_state_shm_->memory());
102 }
103 99
104 CommandBufferDelegate* delegate_; 100 CommandBufferDelegate* delegate_;
105 RemotePtr<mojo::CommandBuffer> command_buffer_; 101 RemotePtr<mojo::CommandBuffer> command_buffer_;
106 scoped_ptr<SyncDispatcher<CommandBufferSyncClient> > sync_dispatcher_; 102 scoped_ptr<SyncDispatcher<CommandBufferSyncClient> > sync_dispatcher_;
107 103
108 State last_state_; 104 State last_state_;
109 scoped_ptr<base::SharedMemory> shared_state_shm_; 105 mojo::ScopedSharedBufferHandle shared_state_handle_;
106 gpu::CommandBufferSharedState* shared_state_;
110 int32 last_put_offset_; 107 int32 last_put_offset_;
111 int32 next_transfer_buffer_id_; 108 int32 next_transfer_buffer_id_;
112 109
113 bool initialize_result_; 110 bool initialize_result_;
114 }; 111 };
115 112
116 } // gles2 113 } // gles2
117 } // mojo 114 } // mojo
118 115
119 #endif // MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ 116 #endif // MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/gles2/command_buffer_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698