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