| 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/at_exit.h" | |
| 9 #include "base/bind.h" | 8 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 11 #include "gpu/command_buffer/client/gles2_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 12 #include "gpu/command_buffer/client/gles2_lib.h" | 11 #include "gpu/command_buffer/client/gles2_lib.h" |
| 13 #include "gpu/command_buffer/client/transfer_buffer.h" | 12 #include "gpu/command_buffer/client/transfer_buffer.h" |
| 14 #include "gpu/command_buffer/common/value_state.h" | 13 #include "gpu/command_buffer/common/value_state.h" |
| 15 #include "gpu/command_buffer/service/context_group.h" | 14 #include "gpu/command_buffer/service/context_group.h" |
| 16 #include "gpu/command_buffer/service/mailbox_manager.h" | 15 #include "gpu/command_buffer/service/mailbox_manager.h" |
| 17 #include "gpu/command_buffer/service/memory_tracking.h" | 16 #include "gpu/command_buffer/service/memory_tracking.h" |
| 18 #include "gpu/command_buffer/service/transfer_buffer_manager.h" | 17 #include "gpu/command_buffer/service/transfer_buffer_manager.h" |
| 19 #include "gpu/command_buffer/service/valuebuffer_manager.h" | 18 #include "gpu/command_buffer/service/valuebuffer_manager.h" |
| 20 #include "gpu/gles2_conform_support/egl/config.h" | 19 #include "gpu/gles2_conform_support/egl/config.h" |
| 21 #include "gpu/gles2_conform_support/egl/surface.h" | 20 #include "gpu/gles2_conform_support/egl/surface.h" |
| 22 | 21 |
| 23 namespace { | 22 namespace { |
| 24 const int32 kCommandBufferSize = 1024 * 1024; | 23 const int32 kCommandBufferSize = 1024 * 1024; |
| 25 const int32 kTransferBufferSize = 512 * 1024; | 24 const int32 kTransferBufferSize = 512 * 1024; |
| 26 } | 25 } |
| 27 | 26 |
| 28 namespace egl { | 27 namespace egl { |
| 29 | 28 |
| 30 Display::Display(EGLNativeDisplayType display_id) | 29 Display::Display(EGLNativeDisplayType display_id) |
| 31 : display_id_(display_id), | 30 : display_id_(display_id), |
| 32 is_initialized_(false), | 31 is_initialized_(false), |
| 33 #if !defined(GLES2_CONFORM_SUPPORT_ONLY) | |
| 34 exit_manager_(new base::AtExitManager), | |
| 35 #endif | |
| 36 create_offscreen_(false), | 32 create_offscreen_(false), |
| 37 create_offscreen_width_(0), | 33 create_offscreen_width_(0), |
| 38 create_offscreen_height_(0) { | 34 create_offscreen_height_(0) { |
| 39 } | 35 } |
| 40 | 36 |
| 41 Display::~Display() { | 37 Display::~Display() { |
| 42 gles2::Terminate(); | 38 gles2::Terminate(); |
| 43 } | 39 } |
| 44 | 40 |
| 45 bool Display::Initialize() { | 41 bool Display::Initialize() { |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 void Display::SetLock(base::Lock*) { | 334 void Display::SetLock(base::Lock*) { |
| 339 NOTIMPLEMENTED(); | 335 NOTIMPLEMENTED(); |
| 340 } | 336 } |
| 341 | 337 |
| 342 bool Display::IsGpuChannelLost() { | 338 bool Display::IsGpuChannelLost() { |
| 343 NOTIMPLEMENTED(); | 339 NOTIMPLEMENTED(); |
| 344 return false; | 340 return false; |
| 345 } | 341 } |
| 346 | 342 |
| 347 } // namespace egl | 343 } // namespace egl |
| OLD | NEW |