| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // Context routines. | 68 // Context routines. |
| 69 bool IsValidContext(EGLContext ctx); | 69 bool IsValidContext(EGLContext ctx); |
| 70 EGLContext CreateContext(EGLConfig config, | 70 EGLContext CreateContext(EGLConfig config, |
| 71 EGLContext share_ctx, | 71 EGLContext share_ctx, |
| 72 const EGLint* attrib_list); | 72 const EGLint* attrib_list); |
| 73 void DestroyContext(EGLContext ctx); | 73 void DestroyContext(EGLContext ctx); |
| 74 bool MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx); | 74 bool MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx); |
| 75 | 75 |
| 76 // GpuControl implementation. | 76 // GpuControl implementation. |
| 77 virtual gpu::Capabilities GetCapabilities() OVERRIDE; | 77 virtual gpu::Capabilities GetCapabilities() override; |
| 78 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(size_t width, | 78 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(size_t width, |
| 79 size_t height, | 79 size_t height, |
| 80 unsigned internalformat, | 80 unsigned internalformat, |
| 81 unsigned usage, | 81 unsigned usage, |
| 82 int32* id) OVERRIDE; | 82 int32* id) override; |
| 83 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; | 83 virtual void DestroyGpuMemoryBuffer(int32 id) override; |
| 84 virtual uint32 InsertSyncPoint() OVERRIDE; | 84 virtual uint32 InsertSyncPoint() override; |
| 85 virtual uint32 InsertFutureSyncPoint() OVERRIDE; | 85 virtual uint32 InsertFutureSyncPoint() override; |
| 86 virtual void RetireSyncPoint(uint32 sync_point) OVERRIDE; | 86 virtual void RetireSyncPoint(uint32 sync_point) override; |
| 87 virtual void SignalSyncPoint(uint32 sync_point, | 87 virtual void SignalSyncPoint(uint32 sync_point, |
| 88 const base::Closure& callback) OVERRIDE; | 88 const base::Closure& callback) override; |
| 89 virtual void SignalQuery(uint32 query, | 89 virtual void SignalQuery(uint32 query, |
| 90 const base::Closure& callback) OVERRIDE; | 90 const base::Closure& callback) override; |
| 91 virtual void SetSurfaceVisible(bool visible) OVERRIDE; | 91 virtual void SetSurfaceVisible(bool visible) override; |
| 92 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; | 92 virtual uint32 CreateStreamTexture(uint32 texture_id) override; |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 EGLNativeDisplayType display_id_; | 95 EGLNativeDisplayType display_id_; |
| 96 | 96 |
| 97 bool is_initialized_; | 97 bool is_initialized_; |
| 98 bool create_offscreen_; | 98 bool create_offscreen_; |
| 99 int create_offscreen_width_; | 99 int create_offscreen_width_; |
| 100 int create_offscreen_height_; | 100 int create_offscreen_height_; |
| 101 | 101 |
| 102 scoped_ptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; | 102 scoped_ptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; |
| 103 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 103 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
| 104 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; | 104 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; |
| 105 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 105 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
| 106 scoped_refptr<gfx::GLContext> gl_context_; | 106 scoped_refptr<gfx::GLContext> gl_context_; |
| 107 scoped_refptr<gfx::GLSurface> gl_surface_; | 107 scoped_refptr<gfx::GLSurface> gl_surface_; |
| 108 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; | 108 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; |
| 109 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 109 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
| 110 | 110 |
| 111 // TODO(alokp): Support more than one config, surface, and context. | 111 // TODO(alokp): Support more than one config, surface, and context. |
| 112 scoped_ptr<Config> config_; | 112 scoped_ptr<Config> config_; |
| 113 scoped_ptr<Surface> surface_; | 113 scoped_ptr<Surface> surface_; |
| 114 scoped_ptr<gpu::gles2::GLES2Implementation> context_; | 114 scoped_ptr<gpu::gles2::GLES2Implementation> context_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(Display); | 116 DISALLOW_COPY_AND_ASSIGN(Display); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace egl | 119 } // namespace egl |
| 120 | 120 |
| 121 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 121 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| OLD | NEW |