| 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 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "gpu/command_buffer/client/gles2_cmd_helper.h" | 14 #include "gpu/command_buffer/client/gles2_cmd_helper.h" |
| 15 #include "gpu/command_buffer/client/gpu_control.h" | 15 #include "gpu/command_buffer/client/gpu_control.h" |
| 16 #include "gpu/command_buffer/service/command_buffer_service.h" | 16 #include "gpu/command_buffer/service/command_buffer_service.h" |
| 17 #include "gpu/command_buffer/service/command_executor.h" | 17 #include "gpu/command_buffer/service/command_executor.h" |
| 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 19 #include "gpu/command_buffer/service/gpu_preferences.h" | 19 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 20 #include "gpu/config/gpu_driver_bug_workarounds.h" |
| 20 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
| 21 #include "ui/gl/gl_context.h" | 22 #include "ui/gl/gl_context.h" |
| 22 #include "ui/gl/gl_surface.h" | 23 #include "ui/gl/gl_surface.h" |
| 23 | 24 |
| 24 namespace gpu { | 25 namespace gpu { |
| 25 class CommandBufferService; | 26 class CommandBufferService; |
| 26 class GpuControl; | 27 class GpuControl; |
| 27 class CommandExecutor; | 28 class CommandExecutor; |
| 28 class TransferBuffer; | 29 class TransferBuffer; |
| 29 class TransferBufferManagerInterface; | 30 class TransferBufferManagerInterface; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 bool IsFenceSyncFlushed(uint64_t release) override; | 102 bool IsFenceSyncFlushed(uint64_t release) override; |
| 102 bool IsFenceSyncFlushReceived(uint64_t release) override; | 103 bool IsFenceSyncFlushReceived(uint64_t release) override; |
| 103 void SignalSyncToken(const gpu::SyncToken& sync_token, | 104 void SignalSyncToken(const gpu::SyncToken& sync_token, |
| 104 const base::Closure& callback) override; | 105 const base::Closure& callback) override; |
| 105 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; | 106 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; |
| 106 | 107 |
| 107 private: | 108 private: |
| 108 EGLNativeDisplayType display_id_; | 109 EGLNativeDisplayType display_id_; |
| 109 | 110 |
| 110 gpu::GpuPreferences gpu_preferences_; | 111 gpu::GpuPreferences gpu_preferences_; |
| 112 const gpu::GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; |
| 111 bool is_initialized_; | 113 bool is_initialized_; |
| 112 | 114 |
| 113 bool create_offscreen_; | 115 bool create_offscreen_; |
| 114 int create_offscreen_width_; | 116 int create_offscreen_width_; |
| 115 int create_offscreen_height_; | 117 int create_offscreen_height_; |
| 116 uint64_t next_fence_sync_release_; | 118 uint64_t next_fence_sync_release_; |
| 117 | 119 |
| 118 scoped_refptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; | 120 scoped_refptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_; |
| 119 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 121 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
| 120 scoped_ptr<gpu::CommandExecutor> executor_; | 122 scoped_ptr<gpu::CommandExecutor> executor_; |
| 121 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 123 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
| 122 scoped_refptr<gfx::GLContext> gl_context_; | 124 scoped_refptr<gfx::GLContext> gl_context_; |
| 123 scoped_refptr<gfx::GLSurface> gl_surface_; | 125 scoped_refptr<gfx::GLSurface> gl_surface_; |
| 124 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; | 126 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_; |
| 125 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 127 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
| 126 | 128 |
| 127 // TODO(alokp): Support more than one config, surface, and context. | 129 // TODO(alokp): Support more than one config, surface, and context. |
| 128 scoped_ptr<Config> config_; | 130 scoped_ptr<Config> config_; |
| 129 scoped_ptr<Surface> surface_; | 131 scoped_ptr<Surface> surface_; |
| 130 scoped_ptr<gpu::gles2::GLES2Implementation> context_; | 132 scoped_ptr<gpu::gles2::GLES2Implementation> context_; |
| 131 | 133 |
| 132 DISALLOW_COPY_AND_ASSIGN(Display); | 134 DISALLOW_COPY_AND_ASSIGN(Display); |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 } // namespace egl | 137 } // namespace egl |
| 136 | 138 |
| 137 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 139 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| OLD | NEW |