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 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class GpuScheduler; | 23 class GpuScheduler; |
24 class TransferBuffer; | 24 class TransferBuffer; |
25 class TransferBufferManagerInterface; | 25 class TransferBufferManagerInterface; |
26 | 26 |
27 namespace gles2 { | 27 namespace gles2 { |
28 class GLES2CmdHelper; | 28 class GLES2CmdHelper; |
29 class GLES2Implementation; | 29 class GLES2Implementation; |
30 } // namespace gles2 | 30 } // namespace gles2 |
31 } // namespace gpu | 31 } // namespace gpu |
32 | 32 |
| 33 namespace base { |
| 34 class AtExitManager; |
| 35 } // namespace base |
| 36 |
33 namespace egl { | 37 namespace egl { |
34 | 38 |
35 class Config; | 39 class Config; |
36 class Surface; | 40 class Surface; |
37 | 41 |
38 class Display : private gpu::GpuControl { | 42 class Display : private gpu::GpuControl { |
39 public: | 43 public: |
40 explicit Display(EGLNativeDisplayType display_id); | 44 explicit Display(EGLNativeDisplayType display_id); |
41 ~Display() override; | 45 ~Display() override; |
42 | 46 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void SignalQuery(uint32 query, const base::Closure& callback) override; | 96 void SignalQuery(uint32 query, const base::Closure& callback) override; |
93 void SetSurfaceVisible(bool visible) override; | 97 void SetSurfaceVisible(bool visible) override; |
94 uint32 CreateStreamTexture(uint32 texture_id) override; | 98 uint32 CreateStreamTexture(uint32 texture_id) override; |
95 void SetLock(base::Lock*) override; | 99 void SetLock(base::Lock*) override; |
96 bool IsGpuChannelLost() override; | 100 bool IsGpuChannelLost() override; |
97 | 101 |
98 private: | 102 private: |
99 EGLNativeDisplayType display_id_; | 103 EGLNativeDisplayType display_id_; |
100 | 104 |
101 bool is_initialized_; | 105 bool is_initialized_; |
| 106 |
| 107 // elg::Display is used for comformance tests and command_buffer_gles. We only |
| 108 // need the exit manager for the command_buffer_gles library. |
| 109 // TODO(hendrikw): Find a cleaner solution for this. |
| 110 #if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY) |
| 111 scoped_ptr<base::AtExitManager> exit_manager_; |
| 112 #endif // COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY |
| 113 |
102 bool create_offscreen_; | 114 bool create_offscreen_; |
103 int create_offscreen_width_; | 115 int create_offscreen_width_; |
104 int create_offscreen_height_; | 116 int create_offscreen_height_; |
105 | 117 |
106 scoped_refptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; | 118 scoped_refptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; |
107 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 119 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
108 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; | 120 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; |
109 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 121 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
110 scoped_refptr<gfx::GLContext> gl_context_; | 122 scoped_refptr<gfx::GLContext> gl_context_; |
111 scoped_refptr<gfx::GLSurface> gl_surface_; | 123 scoped_refptr<gfx::GLSurface> gl_surface_; |
112 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; | 124 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; |
113 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 125 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
114 | 126 |
115 // TODO(alokp): Support more than one config, surface, and context. | 127 // TODO(alokp): Support more than one config, surface, and context. |
116 scoped_ptr<Config> config_; | 128 scoped_ptr<Config> config_; |
117 scoped_ptr<Surface> surface_; | 129 scoped_ptr<Surface> surface_; |
118 scoped_ptr<gpu::gles2::GLES2Implementation> context_; | 130 scoped_ptr<gpu::gles2::GLES2Implementation> context_; |
119 | 131 |
120 DISALLOW_COPY_AND_ASSIGN(Display); | 132 DISALLOW_COPY_AND_ASSIGN(Display); |
121 }; | 133 }; |
122 | 134 |
123 } // namespace egl | 135 } // namespace egl |
124 | 136 |
125 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 137 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
OLD | NEW |