| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/lazy_instance.h" | 15 #include "base/lazy_instance.h" |
| 16 #include "gpu/command_buffer/client/gles2_implementation.h" | 16 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 17 #include "gpu/command_buffer/client/gles2_lib.h" | 17 #include "gpu/command_buffer/client/gles2_lib.h" |
| 18 #include "gpu/command_buffer/client/transfer_buffer.h" | 18 #include "gpu/command_buffer/client/transfer_buffer.h" |
| 19 #include "gpu/command_buffer/common/value_state.h" | |
| 20 #include "gpu/command_buffer/service/context_group.h" | 19 #include "gpu/command_buffer/service/context_group.h" |
| 21 #include "gpu/command_buffer/service/mailbox_manager.h" | 20 #include "gpu/command_buffer/service/mailbox_manager.h" |
| 22 #include "gpu/command_buffer/service/memory_tracking.h" | 21 #include "gpu/command_buffer/service/memory_tracking.h" |
| 23 #include "gpu/command_buffer/service/transfer_buffer_manager.h" | 22 #include "gpu/command_buffer/service/transfer_buffer_manager.h" |
| 24 #include "gpu/command_buffer/service/valuebuffer_manager.h" | |
| 25 #include "gpu/gles2_conform_support/egl/config.h" | 23 #include "gpu/gles2_conform_support/egl/config.h" |
| 26 #include "gpu/gles2_conform_support/egl/surface.h" | 24 #include "gpu/gles2_conform_support/egl/surface.h" |
| 27 #include "gpu/gles2_conform_support/egl/test_support.h" | 25 #include "gpu/gles2_conform_support/egl/test_support.h" |
| 28 | 26 |
| 29 namespace { | 27 namespace { |
| 30 const int32_t kCommandBufferSize = 1024 * 1024; | 28 const int32_t kCommandBufferSize = 1024 * 1024; |
| 31 const int32_t kTransferBufferSize = 512 * 1024; | 29 const int32_t kTransferBufferSize = 512 * 1024; |
| 32 } | 30 } |
| 33 | 31 |
| 34 namespace egl { | 32 namespace egl { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 std::unique_ptr<gpu::CommandBufferService> command_buffer( | 163 std::unique_ptr<gpu::CommandBufferService> command_buffer( |
| 166 new gpu::CommandBufferService(transfer_buffer_manager_.get())); | 164 new gpu::CommandBufferService(transfer_buffer_manager_.get())); |
| 167 if (!command_buffer->Initialize()) | 165 if (!command_buffer->Initialize()) |
| 168 return NULL; | 166 return NULL; |
| 169 | 167 |
| 170 scoped_refptr<gpu::gles2::FeatureInfo> feature_info( | 168 scoped_refptr<gpu::gles2::FeatureInfo> feature_info( |
| 171 new gpu::gles2::FeatureInfo(gpu_driver_bug_workarounds_)); | 169 new gpu::gles2::FeatureInfo(gpu_driver_bug_workarounds_)); |
| 172 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( | 170 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( |
| 173 gpu_preferences_, NULL, NULL, | 171 gpu_preferences_, NULL, NULL, |
| 174 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_), | 172 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_), |
| 175 new gpu::gles2::FramebufferCompletenessCache, feature_info, NULL, NULL, | 173 new gpu::gles2::FramebufferCompletenessCache, feature_info, true)); |
| 176 true)); | |
| 177 | 174 |
| 178 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); | 175 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); |
| 179 if (!decoder_.get()) | 176 if (!decoder_.get()) |
| 180 return EGL_NO_SURFACE; | 177 return EGL_NO_SURFACE; |
| 181 | 178 |
| 182 executor_.reset( | 179 executor_.reset( |
| 183 new gpu::CommandExecutor(command_buffer.get(), decoder_.get(), NULL)); | 180 new gpu::CommandExecutor(command_buffer.get(), decoder_.get(), NULL)); |
| 184 | 181 |
| 185 decoder_->set_engine(executor_.get()); | 182 decoder_->set_engine(executor_.get()); |
| 186 gfx::Size size(create_offscreen_width_, create_offscreen_height_); | 183 gfx::Size size(create_offscreen_width_, create_offscreen_height_); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 void Display::SignalSyncToken(const gpu::SyncToken& sync_token, | 400 void Display::SignalSyncToken(const gpu::SyncToken& sync_token, |
| 404 const base::Closure& callback) { | 401 const base::Closure& callback) { |
| 405 NOTIMPLEMENTED(); | 402 NOTIMPLEMENTED(); |
| 406 } | 403 } |
| 407 | 404 |
| 408 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { | 405 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { |
| 409 return false; | 406 return false; |
| 410 } | 407 } |
| 411 | 408 |
| 412 } // namespace egl | 409 } // namespace egl |
| OLD | NEW |