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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 unsigned usage) override; | 86 unsigned usage) override; |
87 uint32 InsertSyncPoint() override; | 87 uint32 InsertSyncPoint() override; |
88 uint32 InsertFutureSyncPoint() override; | 88 uint32 InsertFutureSyncPoint() override; |
89 void RetireSyncPoint(uint32 sync_point) override; | 89 void RetireSyncPoint(uint32 sync_point) override; |
90 void SignalSyncPoint(uint32 sync_point, | 90 void SignalSyncPoint(uint32 sync_point, |
91 const base::Closure& callback) override; | 91 const base::Closure& callback) override; |
92 void SignalQuery(uint32 query, const base::Closure& callback) override; | 92 void SignalQuery(uint32 query, const base::Closure& callback) override; |
93 void SetSurfaceVisible(bool visible) override; | 93 void SetSurfaceVisible(bool visible) override; |
94 uint32 CreateStreamTexture(uint32 texture_id) override; | 94 uint32 CreateStreamTexture(uint32 texture_id) override; |
95 void SetLock(base::Lock*) override; | 95 void SetLock(base::Lock*) override; |
| 96 bool IsGpuChannelLost() override; |
96 | 97 |
97 private: | 98 private: |
98 EGLNativeDisplayType display_id_; | 99 EGLNativeDisplayType display_id_; |
99 | 100 |
100 bool is_initialized_; | 101 bool is_initialized_; |
101 bool create_offscreen_; | 102 bool create_offscreen_; |
102 int create_offscreen_width_; | 103 int create_offscreen_width_; |
103 int create_offscreen_height_; | 104 int create_offscreen_height_; |
104 | 105 |
105 scoped_ptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; | 106 scoped_ptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; |
106 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 107 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
107 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; | 108 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; |
108 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 109 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
109 scoped_refptr<gfx::GLContext> gl_context_; | 110 scoped_refptr<gfx::GLContext> gl_context_; |
110 scoped_refptr<gfx::GLSurface> gl_surface_; | 111 scoped_refptr<gfx::GLSurface> gl_surface_; |
111 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; | 112 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; |
112 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 113 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
113 | 114 |
114 // TODO(alokp): Support more than one config, surface, and context. | 115 // TODO(alokp): Support more than one config, surface, and context. |
115 scoped_ptr<Config> config_; | 116 scoped_ptr<Config> config_; |
116 scoped_ptr<Surface> surface_; | 117 scoped_ptr<Surface> surface_; |
117 scoped_ptr<gpu::gles2::GLES2Implementation> context_; | 118 scoped_ptr<gpu::gles2::GLES2Implementation> context_; |
118 | 119 |
119 DISALLOW_COPY_AND_ASSIGN(Display); | 120 DISALLOW_COPY_AND_ASSIGN(Display); |
120 }; | 121 }; |
121 | 122 |
122 } // namespace egl | 123 } // namespace egl |
123 | 124 |
124 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 125 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
OLD | NEW |