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_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ |
6 #define GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include "base/callback.h" | 11 #include "base/callback.h" |
9 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
10 #include "gl_in_process_context_export.h" | 13 #include "gl_in_process_context_export.h" |
11 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 14 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
12 #include "gpu/command_buffer/service/in_process_command_buffer.h" | 15 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
13 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
14 #include "ui/gl/gl_surface.h" | 17 #include "ui/gl/gl_surface.h" |
15 #include "ui/gl/gpu_preference.h" | 18 #include "ui/gl/gpu_preference.h" |
16 | 19 |
17 namespace gfx { | 20 namespace gfx { |
18 class Size; | 21 class Size; |
19 } | 22 } |
20 | 23 |
21 #if defined(OS_ANDROID) | 24 #if defined(OS_ANDROID) |
22 namespace gfx { | 25 namespace gfx { |
23 class SurfaceTexture; | 26 class SurfaceTexture; |
24 } | 27 } |
25 #endif | 28 #endif |
26 | 29 |
27 namespace gpu { | 30 namespace gpu { |
28 | 31 |
29 namespace gles2 { | 32 namespace gles2 { |
30 class GLES2Implementation; | 33 class GLES2Implementation; |
31 } | 34 } |
32 | 35 |
33 struct GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContextSharedMemoryLimits { | 36 struct GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContextSharedMemoryLimits { |
34 GLInProcessContextSharedMemoryLimits(); | 37 GLInProcessContextSharedMemoryLimits(); |
35 | 38 |
36 int32 command_buffer_size; | 39 int32_t command_buffer_size; |
37 unsigned int start_transfer_buffer_size; | 40 unsigned int start_transfer_buffer_size; |
38 unsigned int min_transfer_buffer_size; | 41 unsigned int min_transfer_buffer_size; |
39 unsigned int max_transfer_buffer_size; | 42 unsigned int max_transfer_buffer_size; |
40 unsigned int mapped_memory_reclaim_limit; | 43 unsigned int mapped_memory_reclaim_limit; |
41 }; | 44 }; |
42 | 45 |
43 class GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContext { | 46 class GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContext { |
44 public: | 47 public: |
45 virtual ~GLInProcessContext() {} | 48 virtual ~GLInProcessContext() {} |
46 | 49 |
(...skipping 26 matching lines...) Expand all Loading... |
73 // Allows direct access to the GLES2 implementation so a GLInProcessContext | 76 // Allows direct access to the GLES2 implementation so a GLInProcessContext |
74 // can be used without making it current. | 77 // can be used without making it current. |
75 virtual gles2::GLES2Implementation* GetImplementation() = 0; | 78 virtual gles2::GLES2Implementation* GetImplementation() = 0; |
76 | 79 |
77 virtual size_t GetMappedMemoryLimit() = 0; | 80 virtual size_t GetMappedMemoryLimit() = 0; |
78 | 81 |
79 virtual void SetLock(base::Lock* lock) = 0; | 82 virtual void SetLock(base::Lock* lock) = 0; |
80 | 83 |
81 #if defined(OS_ANDROID) | 84 #if defined(OS_ANDROID) |
82 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( | 85 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( |
83 uint32 stream_id) = 0; | 86 uint32_t stream_id) = 0; |
84 virtual uint32 CreateStreamTexture(uint32 texture_id) = 0; | 87 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; |
85 #endif | 88 #endif |
86 }; | 89 }; |
87 | 90 |
88 } // namespace gpu | 91 } // namespace gpu |
89 | 92 |
90 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ | 93 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ |
OLD | NEW |