| 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/shared_memory_limits.h" |
| 18 #include "gpu/command_buffer/client/transfer_buffer.h" | 19 #include "gpu/command_buffer/client/transfer_buffer.h" |
| 19 #include "gpu/command_buffer/common/value_state.h" | 20 #include "gpu/command_buffer/common/value_state.h" |
| 20 #include "gpu/command_buffer/service/context_group.h" | 21 #include "gpu/command_buffer/service/context_group.h" |
| 21 #include "gpu/command_buffer/service/mailbox_manager.h" | 22 #include "gpu/command_buffer/service/mailbox_manager.h" |
| 22 #include "gpu/command_buffer/service/memory_tracking.h" | 23 #include "gpu/command_buffer/service/memory_tracking.h" |
| 23 #include "gpu/command_buffer/service/transfer_buffer_manager.h" | 24 #include "gpu/command_buffer/service/transfer_buffer_manager.h" |
| 24 #include "gpu/command_buffer/service/valuebuffer_manager.h" | 25 #include "gpu/command_buffer/service/valuebuffer_manager.h" |
| 25 #include "gpu/gles2_conform_support/egl/config.h" | 26 #include "gpu/gles2_conform_support/egl/config.h" |
| 26 #include "gpu/gles2_conform_support/egl/surface.h" | 27 #include "gpu/gles2_conform_support/egl/surface.h" |
| 27 #include "gpu/gles2_conform_support/egl/test_support.h" | 28 #include "gpu/gles2_conform_support/egl/test_support.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 288 |
| 288 context_.reset( | 289 context_.reset( |
| 289 new gpu::gles2::GLES2Implementation(gles2_cmd_helper_.get(), | 290 new gpu::gles2::GLES2Implementation(gles2_cmd_helper_.get(), |
| 290 NULL, | 291 NULL, |
| 291 transfer_buffer_.get(), | 292 transfer_buffer_.get(), |
| 292 bind_generates_resources, | 293 bind_generates_resources, |
| 293 lose_context_when_out_of_memory, | 294 lose_context_when_out_of_memory, |
| 294 support_client_side_arrays, | 295 support_client_side_arrays, |
| 295 this)); | 296 this)); |
| 296 | 297 |
| 297 if (!context_->Initialize( | 298 if (!context_->Initialize(kTransferBufferSize, kTransferBufferSize / 2, |
| 298 kTransferBufferSize, | 299 kTransferBufferSize * 2, |
| 299 kTransferBufferSize / 2, | 300 gpu::SharedMemoryLimits::kNoLimit)) { |
| 300 kTransferBufferSize * 2, | |
| 301 gpu::gles2::GLES2Implementation::kNoLimit)) { | |
| 302 return EGL_NO_CONTEXT; | 301 return EGL_NO_CONTEXT; |
| 303 } | 302 } |
| 304 | 303 |
| 305 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets"); | 304 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets"); |
| 306 context_->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs"); | 305 context_->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs"); |
| 307 | 306 |
| 308 return context_.get(); | 307 return context_.get(); |
| 309 } | 308 } |
| 310 | 309 |
| 311 void Display::DestroyContext(EGLContext ctx) { | 310 void Display::DestroyContext(EGLContext ctx) { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 void Display::SignalSyncToken(const gpu::SyncToken& sync_token, | 402 void Display::SignalSyncToken(const gpu::SyncToken& sync_token, |
| 404 const base::Closure& callback) { | 403 const base::Closure& callback) { |
| 405 NOTIMPLEMENTED(); | 404 NOTIMPLEMENTED(); |
| 406 } | 405 } |
| 407 | 406 |
| 408 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { | 407 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { |
| 409 return false; | 408 return false; |
| 410 } | 409 } |
| 411 | 410 |
| 412 } // namespace egl | 411 } // namespace egl |
| OLD | NEW |