| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 void RetireSyncPoint(uint32 sync_point) override; | 93 void RetireSyncPoint(uint32 sync_point) override; |
| 94 void SignalSyncPoint(uint32 sync_point, | 94 void SignalSyncPoint(uint32 sync_point, |
| 95 const base::Closure& callback) override; | 95 const base::Closure& callback) override; |
| 96 void SignalQuery(uint32 query, const base::Closure& callback) override; | 96 void SignalQuery(uint32 query, const base::Closure& callback) override; |
| 97 void SetSurfaceVisible(bool visible) override; | 97 void SetSurfaceVisible(bool visible) override; |
| 98 uint32 CreateStreamTexture(uint32 texture_id) override; | 98 uint32 CreateStreamTexture(uint32 texture_id) override; |
| 99 void SetLock(base::Lock*) override; | 99 void SetLock(base::Lock*) override; |
| 100 bool IsGpuChannelLost() override; | 100 bool IsGpuChannelLost() override; |
| 101 gpu::CommandBufferNamespace GetNamespaceID() const override; | 101 gpu::CommandBufferNamespace GetNamespaceID() const override; |
| 102 uint64_t GetCommandBufferID() const override; | 102 uint64_t GetCommandBufferID() const override; |
| 103 uint64_t GenerateFenceSyncRelease() override; |
| 104 bool IsFenceSyncRelease(uint64_t release) override; |
| 105 bool IsFenceSyncFlushed(uint64_t release) override; |
| 103 | 106 |
| 104 private: | 107 private: |
| 105 EGLNativeDisplayType display_id_; | 108 EGLNativeDisplayType display_id_; |
| 106 | 109 |
| 107 bool is_initialized_; | 110 bool is_initialized_; |
| 108 | 111 |
| 109 // elg::Display is used for comformance tests and command_buffer_gles. We only | 112 // elg::Display is used for comformance tests and command_buffer_gles. We only |
| 110 // need the exit manager for the command_buffer_gles library. | 113 // need the exit manager for the command_buffer_gles library. |
| 111 // TODO(hendrikw): Find a cleaner solution for this. | 114 // TODO(hendrikw): Find a cleaner solution for this. |
| 112 #if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY) | 115 #if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY) |
| 113 scoped_ptr<base::AtExitManager> exit_manager_; | 116 scoped_ptr<base::AtExitManager> exit_manager_; |
| 114 #endif // COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY | 117 #endif // COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY |
| 115 | 118 |
| 116 bool create_offscreen_; | 119 bool create_offscreen_; |
| 117 int create_offscreen_width_; | 120 int create_offscreen_width_; |
| 118 int create_offscreen_height_; | 121 int create_offscreen_height_; |
| 122 uint64_t next_fence_sync_release_; |
| 119 | 123 |
| 120 scoped_refptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; | 124 scoped_refptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; |
| 121 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 125 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
| 122 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; | 126 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; |
| 123 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 127 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
| 124 scoped_refptr<gfx::GLContext> gl_context_; | 128 scoped_refptr<gfx::GLContext> gl_context_; |
| 125 scoped_refptr<gfx::GLSurface> gl_surface_; | 129 scoped_refptr<gfx::GLSurface> gl_surface_; |
| 126 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; | 130 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; |
| 127 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 131 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
| 128 | 132 |
| 129 // TODO(alokp): Support more than one config, surface, and context. | 133 // TODO(alokp): Support more than one config, surface, and context. |
| 130 scoped_ptr<Config> config_; | 134 scoped_ptr<Config> config_; |
| 131 scoped_ptr<Surface> surface_; | 135 scoped_ptr<Surface> surface_; |
| 132 scoped_ptr<gpu::gles2::GLES2Implementation> context_; | 136 scoped_ptr<gpu::gles2::GLES2Implementation> context_; |
| 133 | 137 |
| 134 DISALLOW_COPY_AND_ASSIGN(Display); | 138 DISALLOW_COPY_AND_ASSIGN(Display); |
| 135 }; | 139 }; |
| 136 | 140 |
| 137 } // namespace egl | 141 } // namespace egl |
| 138 | 142 |
| 139 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 143 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| OLD | NEW |