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