| 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 #ifndef GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 5 #ifndef GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| 6 #define GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 6 #define GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| 7 | 7 |
| 8 #include <EGL/egl.h> | 8 #include <EGL/egl.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class GpuScheduler; | 26 class GpuScheduler; |
| 27 class TransferBuffer; | 27 class TransferBuffer; |
| 28 class TransferBufferManagerInterface; | 28 class TransferBufferManagerInterface; |
| 29 | 29 |
| 30 namespace gles2 { | 30 namespace gles2 { |
| 31 class GLES2CmdHelper; | 31 class GLES2CmdHelper; |
| 32 class GLES2Implementation; | 32 class GLES2Implementation; |
| 33 } // namespace gles2 | 33 } // namespace gles2 |
| 34 } // namespace gpu | 34 } // namespace gpu |
| 35 | 35 |
| 36 namespace base { | |
| 37 class AtExitManager; | |
| 38 } // namespace base | |
| 39 | |
| 40 namespace egl { | 36 namespace egl { |
| 41 | 37 |
| 42 class Config; | 38 class Config; |
| 43 class Surface; | 39 class Surface; |
| 44 | 40 |
| 45 class Display : private gpu::GpuControl { | 41 class Display : private gpu::GpuControl { |
| 46 public: | 42 public: |
| 47 explicit Display(EGLNativeDisplayType display_id); | 43 explicit Display(EGLNativeDisplayType display_id); |
| 48 ~Display() override; | 44 ~Display() override; |
| 49 | 45 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 bool IsFenceSyncFlushReceived(uint64_t release) override; | 105 bool IsFenceSyncFlushReceived(uint64_t release) override; |
| 110 void SignalSyncToken(const gpu::SyncToken& sync_token, | 106 void SignalSyncToken(const gpu::SyncToken& sync_token, |
| 111 const base::Closure& callback) override; | 107 const base::Closure& callback) override; |
| 112 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; | 108 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; |
| 113 | 109 |
| 114 private: | 110 private: |
| 115 EGLNativeDisplayType display_id_; | 111 EGLNativeDisplayType display_id_; |
| 116 | 112 |
| 117 bool is_initialized_; | 113 bool is_initialized_; |
| 118 | 114 |
| 119 // elg::Display is used for comformance tests and command_buffer_gles. We only | |
| 120 // need the exit manager for the command_buffer_gles library. | |
| 121 // TODO(hendrikw): Find a cleaner solution for this. | |
| 122 #if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY) | |
| 123 scoped_ptr<base::AtExitManager> exit_manager_; | |
| 124 #endif // COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY | |
| 125 | |
| 126 bool create_offscreen_; | 115 bool create_offscreen_; |
| 127 int create_offscreen_width_; | 116 int create_offscreen_width_; |
| 128 int create_offscreen_height_; | 117 int create_offscreen_height_; |
| 129 uint64_t next_fence_sync_release_; | 118 uint64_t next_fence_sync_release_; |
| 130 | 119 |
| 131 scoped_refptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; | 120 scoped_refptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; |
| 132 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 121 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
| 133 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; | 122 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; |
| 134 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 123 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
| 135 scoped_refptr<gfx::GLContext> gl_context_; | 124 scoped_refptr<gfx::GLContext> gl_context_; |
| 136 scoped_refptr<gfx::GLSurface> gl_surface_; | 125 scoped_refptr<gfx::GLSurface> gl_surface_; |
| 137 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; | 126 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; |
| 138 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 127 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
| 139 | 128 |
| 140 // TODO(alokp): Support more than one config, surface, and context. | 129 // TODO(alokp): Support more than one config, surface, and context. |
| 141 scoped_ptr<Config> config_; | 130 scoped_ptr<Config> config_; |
| 142 scoped_ptr<Surface> surface_; | 131 scoped_ptr<Surface> surface_; |
| 143 scoped_ptr<gpu::gles2::GLES2Implementation> context_; | 132 scoped_ptr<gpu::gles2::GLES2Implementation> context_; |
| 144 | 133 |
| 145 DISALLOW_COPY_AND_ASSIGN(Display); | 134 DISALLOW_COPY_AND_ASSIGN(Display); |
| 146 }; | 135 }; |
| 147 | 136 |
| 148 } // namespace egl | 137 } // namespace egl |
| 149 | 138 |
| 150 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 139 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| OLD | NEW |