OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "mojo/services/gles2/command_buffer_impl.h" | 5 #include "mojo/services/gles2/command_buffer_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 | 9 |
10 #include "gpu/command_buffer/common/constants.h" | 10 #include "gpu/command_buffer/common/constants.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 false /* offscreen */, | 99 false /* offscreen */, |
100 size_, | 100 size_, |
101 disallowed_features, | 101 disallowed_features, |
102 attrib_vector)) | 102 attrib_vector)) |
103 return false; | 103 return false; |
104 | 104 |
105 gpu_control_.reset( | 105 gpu_control_.reset( |
106 new gpu::GpuControlService(context_group->image_manager(), | 106 new gpu::GpuControlService(context_group->image_manager(), |
107 NULL, | 107 NULL, |
108 context_group->mailbox_manager(), | 108 context_group->mailbox_manager(), |
109 NULL, | 109 NULL)); |
110 decoder_->GetCapabilities())); | |
111 | 110 |
112 command_buffer_->SetPutOffsetChangeCallback(base::Bind( | 111 command_buffer_->SetPutOffsetChangeCallback(base::Bind( |
113 &gpu::GpuScheduler::PutChanged, base::Unretained(scheduler_.get()))); | 112 &gpu::GpuScheduler::PutChanged, base::Unretained(scheduler_.get()))); |
114 command_buffer_->SetGetBufferChangeCallback(base::Bind( | 113 command_buffer_->SetGetBufferChangeCallback(base::Bind( |
115 &gpu::GpuScheduler::SetGetBuffer, base::Unretained(scheduler_.get()))); | 114 &gpu::GpuScheduler::SetGetBuffer, base::Unretained(scheduler_.get()))); |
116 command_buffer_->SetParseErrorCallback( | 115 command_buffer_->SetParseErrorCallback( |
117 base::Bind(&CommandBufferImpl::OnParseError, base::Unretained(this))); | 116 base::Bind(&CommandBufferImpl::OnParseError, base::Unretained(this))); |
118 | 117 |
119 // TODO(piman): other callbacks | 118 // TODO(piman): other callbacks |
120 | 119 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 166 |
168 void CommandBufferImpl::OnParseError() { | 167 void CommandBufferImpl::OnParseError() { |
169 gpu::CommandBuffer::State state = command_buffer_->GetState(); | 168 gpu::CommandBuffer::State state = command_buffer_->GetState(); |
170 client_->LostContext(state.context_lost_reason); | 169 client_->LostContext(state.context_lost_reason); |
171 } | 170 } |
172 | 171 |
173 void CommandBufferImpl::DrawAnimationFrame() { client_->DrawAnimationFrame(); } | 172 void CommandBufferImpl::DrawAnimationFrame() { client_->DrawAnimationFrame(); } |
174 | 173 |
175 } // namespace services | 174 } // namespace services |
176 } // namespace mojo | 175 } // namespace mojo |
OLD | NEW |