| 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" |
| 11 #include "gpu/command_buffer/client/gles2_cmd_helper.h" | 11 #include "gpu/command_buffer/client/gles2_cmd_helper.h" |
| 12 #include "gpu/command_buffer/service/command_buffer_service.h" | 12 #include "gpu/command_buffer/service/command_buffer_service.h" |
| 13 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 13 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 14 #include "gpu/command_buffer/service/gpu_scheduler.h" | 14 #include "gpu/command_buffer/service/gpu_scheduler.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
| 16 #include "ui/gl/gl_context.h" | 16 #include "ui/gl/gl_context.h" |
| 17 #include "ui/gl/gl_surface.h" | 17 #include "ui/gl/gl_surface.h" |
| 18 | 18 |
| 19 namespace gpu { | 19 namespace gpu { |
| 20 class CommandBufferService; | 20 class CommandBufferService; |
| 21 class GpuScheduler; | 21 class GpuScheduler; |
| 22 class TransferBuffer; | 22 class TransferBuffer; |
| 23 class TransferBufferManagerInterface; |
| 23 | 24 |
| 24 namespace gles2 { | 25 namespace gles2 { |
| 25 class GLES2CmdHelper; | 26 class GLES2CmdHelper; |
| 26 class GLES2Implementation; | 27 class GLES2Implementation; |
| 27 } // namespace gles2 | 28 } // namespace gles2 |
| 28 } // namespace gpu | 29 } // namespace gpu |
| 29 | 30 |
| 30 namespace egl { | 31 namespace egl { |
| 31 | 32 |
| 32 class Config; | 33 class Config; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 59 EGLContext CreateContext(EGLConfig config, | 60 EGLContext CreateContext(EGLConfig config, |
| 60 EGLContext share_ctx, | 61 EGLContext share_ctx, |
| 61 const EGLint* attrib_list); | 62 const EGLint* attrib_list); |
| 62 void DestroyContext(EGLContext ctx); | 63 void DestroyContext(EGLContext ctx); |
| 63 bool MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx); | 64 bool MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx); |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 EGLNativeDisplayType display_id_; | 67 EGLNativeDisplayType display_id_; |
| 67 | 68 |
| 68 bool is_initialized_; | 69 bool is_initialized_; |
| 70 scoped_ptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; |
| 69 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 71 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
| 70 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; | 72 scoped_ptr<gpu::GpuScheduler> gpu_scheduler_; |
| 71 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 73 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
| 72 scoped_refptr<gfx::GLContext> gl_context_; | 74 scoped_refptr<gfx::GLContext> gl_context_; |
| 73 scoped_refptr<gfx::GLSurface> gl_surface_; | 75 scoped_refptr<gfx::GLSurface> gl_surface_; |
| 74 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; | 76 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; |
| 75 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 77 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
| 76 | 78 |
| 77 // TODO(alokp): Support more than one config, surface, and context. | 79 // TODO(alokp): Support more than one config, surface, and context. |
| 78 scoped_ptr<Config> config_; | 80 scoped_ptr<Config> config_; |
| 79 scoped_ptr<Surface> surface_; | 81 scoped_ptr<Surface> surface_; |
| 80 scoped_ptr<gpu::gles2::GLES2Implementation> context_; | 82 scoped_ptr<gpu::gles2::GLES2Implementation> context_; |
| 81 | 83 |
| 82 DISALLOW_COPY_AND_ASSIGN(Display); | 84 DISALLOW_COPY_AND_ASSIGN(Display); |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } // namespace egl | 87 } // namespace egl |
| 86 | 88 |
| 87 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 89 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| OLD | NEW |