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 create_offscreen_(false), | 32 create_offscreen_(false), |
34 create_offscreen_width_(0), | 33 create_offscreen_width_(0), |
35 create_offscreen_height_(0), | 34 create_offscreen_height_(0) { |
36 exit_manager_(new base::AtExitManager) {} | 35 } |
37 | 36 |
38 Display::~Display() { | 37 Display::~Display() { |
39 gles2::Terminate(); | 38 gles2::Terminate(); |
40 } | 39 } |
41 | 40 |
42 bool Display::Initialize() { | 41 bool Display::Initialize() { |
43 gles2::Initialize(); | 42 gles2::Initialize(); |
44 is_initialized_ = true; | 43 is_initialized_ = true; |
45 return true; | 44 return true; |
46 } | 45 } |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 void Display::SetLock(base::Lock*) { | 334 void Display::SetLock(base::Lock*) { |
336 NOTIMPLEMENTED(); | 335 NOTIMPLEMENTED(); |
337 } | 336 } |
338 | 337 |
339 bool Display::IsGpuChannelLost() { | 338 bool Display::IsGpuChannelLost() { |
340 NOTIMPLEMENTED(); | 339 NOTIMPLEMENTED(); |
341 return false; | 340 return false; |
342 } | 341 } |
343 | 342 |
344 } // namespace egl | 343 } // namespace egl |
OLD | NEW |