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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 std::vector<int32> attrib_vector; | 105 std::vector<int32> attrib_vector; |
106 if (!decoder_->Initialize(surface, | 106 if (!decoder_->Initialize(surface, |
107 context, | 107 context, |
108 false /* offscreen */, | 108 false /* offscreen */, |
109 size_, | 109 size_, |
110 disallowed_features, | 110 disallowed_features, |
111 attrib_vector)) | 111 attrib_vector)) |
112 return false; | 112 return false; |
113 | 113 |
114 gpu_control_.reset( | 114 gpu_control_.reset( |
115 new gpu::GpuControlService(context_group->image_manager(), | 115 new gpu::GpuControlService(context_group->image_manager(), NULL)); |
116 NULL, | |
117 context_group->mailbox_manager(), | |
118 NULL, | |
119 decoder_->GetCapabilities())); | |
120 | 116 |
121 command_buffer_->SetPutOffsetChangeCallback(base::Bind( | 117 command_buffer_->SetPutOffsetChangeCallback(base::Bind( |
122 &gpu::GpuScheduler::PutChanged, base::Unretained(scheduler_.get()))); | 118 &gpu::GpuScheduler::PutChanged, base::Unretained(scheduler_.get()))); |
123 command_buffer_->SetGetBufferChangeCallback(base::Bind( | 119 command_buffer_->SetGetBufferChangeCallback(base::Bind( |
124 &gpu::GpuScheduler::SetGetBuffer, base::Unretained(scheduler_.get()))); | 120 &gpu::GpuScheduler::SetGetBuffer, base::Unretained(scheduler_.get()))); |
125 command_buffer_->SetParseErrorCallback( | 121 command_buffer_->SetParseErrorCallback( |
126 base::Bind(&CommandBufferImpl::OnParseError, base::Unretained(this))); | 122 base::Bind(&CommandBufferImpl::OnParseError, base::Unretained(this))); |
127 | 123 |
128 // TODO(piman): other callbacks | 124 // TODO(piman): other callbacks |
129 | 125 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 181 |
186 void CommandBufferImpl::OnParseError() { | 182 void CommandBufferImpl::OnParseError() { |
187 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); | 183 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); |
188 client_->LostContext(state.context_lost_reason); | 184 client_->LostContext(state.context_lost_reason); |
189 } | 185 } |
190 | 186 |
191 void CommandBufferImpl::DrawAnimationFrame() { client_->DrawAnimationFrame(); } | 187 void CommandBufferImpl::DrawAnimationFrame() { client_->DrawAnimationFrame(); } |
192 | 188 |
193 } // namespace services | 189 } // namespace services |
194 } // namespace mojo | 190 } // namespace mojo |
OLD | NEW |