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> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 bool is_offscreen, | 61 bool is_offscreen, |
62 gfx::AcceleratedWidget window, | 62 gfx::AcceleratedWidget window, |
63 const gfx::Size& size, | 63 const gfx::Size& size, |
64 GLInProcessContext* share_context, | 64 GLInProcessContext* share_context, |
65 const gpu::gles2::ContextCreationAttribHelper& attribs, | 65 const gpu::gles2::ContextCreationAttribHelper& attribs, |
66 gfx::GpuPreference gpu_preference, | 66 gfx::GpuPreference gpu_preference, |
67 const GLInProcessContextSharedMemoryLimits& memory_limits, | 67 const GLInProcessContextSharedMemoryLimits& memory_limits, |
68 GpuMemoryBufferManager* gpu_memory_buffer_manager, | 68 GpuMemoryBufferManager* gpu_memory_buffer_manager, |
69 ImageFactory* image_factory); | 69 ImageFactory* image_factory); |
70 | 70 |
| 71 virtual void SetContextLostCallback(const base::Closure& callback) = 0; |
| 72 |
71 // Allows direct access to the GLES2 implementation so a GLInProcessContext | 73 // Allows direct access to the GLES2 implementation so a GLInProcessContext |
72 // can be used without making it current. | 74 // can be used without making it current. |
73 virtual gles2::GLES2Implementation* GetImplementation() = 0; | 75 virtual gles2::GLES2Implementation* GetImplementation() = 0; |
74 | 76 |
75 virtual size_t GetMappedMemoryLimit() = 0; | 77 virtual size_t GetMappedMemoryLimit() = 0; |
76 | 78 |
77 virtual void SetLock(base::Lock* lock) = 0; | 79 virtual void SetLock(base::Lock* lock) = 0; |
78 | 80 |
79 #if defined(OS_ANDROID) | 81 #if defined(OS_ANDROID) |
80 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( | 82 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( |
81 uint32_t stream_id) = 0; | 83 uint32_t stream_id) = 0; |
82 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; | 84 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; |
83 #endif | 85 #endif |
84 }; | 86 }; |
85 | 87 |
86 } // namespace gpu | 88 } // namespace gpu |
87 | 89 |
88 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ | 90 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ |
OLD | NEW |