OLD | NEW |
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 #include "gpu/gles2_conform_support/egl/display.h" | 5 #include "gpu/gles2_conform_support/egl/display.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "gpu/command_buffer/client/gles2_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
11 #include "gpu/command_buffer/client/gles2_lib.h" | 11 #include "gpu/command_buffer/client/gles2_lib.h" |
12 #include "gpu/command_buffer/client/transfer_buffer.h" | 12 #include "gpu/command_buffer/client/transfer_buffer.h" |
| 13 #include "gpu/command_buffer/common/value_state.h" |
13 #include "gpu/command_buffer/service/context_group.h" | 14 #include "gpu/command_buffer/service/context_group.h" |
14 #include "gpu/command_buffer/service/mailbox_manager.h" | 15 #include "gpu/command_buffer/service/mailbox_manager.h" |
15 #include "gpu/command_buffer/service/memory_tracking.h" | 16 #include "gpu/command_buffer/service/memory_tracking.h" |
16 #include "gpu/command_buffer/service/transfer_buffer_manager.h" | 17 #include "gpu/command_buffer/service/transfer_buffer_manager.h" |
17 #include "gpu/gles2_conform_support/egl/config.h" | 18 #include "gpu/gles2_conform_support/egl/config.h" |
18 #include "gpu/gles2_conform_support/egl/surface.h" | 19 #include "gpu/gles2_conform_support/egl/surface.h" |
19 | 20 |
20 namespace { | 21 namespace { |
21 const int32 kCommandBufferSize = 1024 * 1024; | 22 const int32 kCommandBufferSize = 1024 * 1024; |
22 const int32 kTransferBufferSize = 512 * 1024; | 23 const int32 kTransferBufferSize = 512 * 1024; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); | 109 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); |
109 transfer_buffer_manager_.reset(manager); | 110 transfer_buffer_manager_.reset(manager); |
110 manager->Initialize(); | 111 manager->Initialize(); |
111 } | 112 } |
112 scoped_ptr<gpu::CommandBufferService> command_buffer( | 113 scoped_ptr<gpu::CommandBufferService> command_buffer( |
113 new gpu::CommandBufferService(transfer_buffer_manager_.get())); | 114 new gpu::CommandBufferService(transfer_buffer_manager_.get())); |
114 if (!command_buffer->Initialize()) | 115 if (!command_buffer->Initialize()) |
115 return NULL; | 116 return NULL; |
116 | 117 |
117 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( | 118 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( |
118 NULL, NULL, new gpu::gles2::ShaderTranslatorCache, NULL, true)); | 119 NULL, NULL, new gpu::gles2::ShaderTranslatorCache, NULL, NULL, true)); |
119 | 120 |
120 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); | 121 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); |
121 if (!decoder_.get()) | 122 if (!decoder_.get()) |
122 return EGL_NO_SURFACE; | 123 return EGL_NO_SURFACE; |
123 | 124 |
124 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), | 125 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), |
125 decoder_.get(), | 126 decoder_.get(), |
126 NULL)); | 127 NULL)); |
127 | 128 |
128 decoder_->set_engine(gpu_scheduler_.get()); | 129 decoder_->set_engine(gpu_scheduler_.get()); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 void Display::SetSurfaceVisible(bool visible) { | 322 void Display::SetSurfaceVisible(bool visible) { |
322 NOTIMPLEMENTED(); | 323 NOTIMPLEMENTED(); |
323 } | 324 } |
324 | 325 |
325 uint32 Display::CreateStreamTexture(uint32 texture_id) { | 326 uint32 Display::CreateStreamTexture(uint32 texture_id) { |
326 NOTIMPLEMENTED(); | 327 NOTIMPLEMENTED(); |
327 return 0; | 328 return 0; |
328 } | 329 } |
329 | 330 |
330 } // namespace egl | 331 } // namespace egl |
OLD | NEW |