Chromium Code Reviews| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 scheduler_.reset(new gpu::GpuScheduler( | 89 scheduler_.reset(new gpu::GpuScheduler( |
| 90 command_buffer_.get(), decoder_.get(), decoder_.get())); | 90 command_buffer_.get(), decoder_.get(), decoder_.get())); |
| 91 decoder_->set_engine(scheduler_.get()); | 91 decoder_->set_engine(scheduler_.get()); |
| 92 | 92 |
| 93 gpu::gles2::DisallowedFeatures disallowed_features; | 93 gpu::gles2::DisallowedFeatures disallowed_features; |
| 94 | 94 |
| 95 // TODO(piman): attributes. | 95 // TODO(piman): attributes. |
| 96 std::vector<int32> attrib_vector; | 96 std::vector<int32> attrib_vector; |
| 97 if (!decoder_->Initialize(surface, | 97 if (!decoder_->Initialize(surface, |
| 98 context, | 98 context, |
| 99 new gpu::gles2::ShaderTranslatorCache, | |
|
no sievers
2014/04/02 18:30:19
We don't actually have to create one per decoder,
piman
2014/04/02 21:58:33
Currently, mojo support is still in its infancy. W
| |
| 99 false /* offscreen */, | 100 false /* offscreen */, |
| 100 size_, | 101 size_, |
| 101 disallowed_features, | 102 disallowed_features, |
| 102 attrib_vector)) | 103 attrib_vector)) |
| 103 return false; | 104 return false; |
| 104 | 105 |
| 105 gpu_control_.reset( | 106 gpu_control_.reset( |
| 106 new gpu::GpuControlService(context_group->image_manager(), | 107 new gpu::GpuControlService(context_group->image_manager(), |
| 107 NULL, | 108 NULL, |
| 108 context_group->mailbox_manager(), | 109 context_group->mailbox_manager(), |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 | 175 |
| 175 void CommandBufferImpl::OnParseError() { | 176 void CommandBufferImpl::OnParseError() { |
| 176 gpu::CommandBuffer::State state = command_buffer_->GetState(); | 177 gpu::CommandBuffer::State state = command_buffer_->GetState(); |
| 177 client_->LostContext(state.context_lost_reason); | 178 client_->LostContext(state.context_lost_reason); |
| 178 } | 179 } |
| 179 | 180 |
| 180 void CommandBufferImpl::DrawAnimationFrame() { client_->DrawAnimationFrame(); } | 181 void CommandBufferImpl::DrawAnimationFrame() { client_->DrawAnimationFrame(); } |
| 181 | 182 |
| 182 } // namespace services | 183 } // namespace services |
| 183 } // namespace mojo | 184 } // namespace mojo |
| OLD | NEW |