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