OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 bool support_locking, | 57 bool support_locking, |
58 const gpu::SharedMemoryLimits& memory_limits, | 58 const gpu::SharedMemoryLimits& memory_limits, |
59 const gpu::gles2::ContextCreationAttribHelper& attributes, | 59 const gpu::gles2::ContextCreationAttribHelper& attributes, |
60 ContextProviderCommandBuffer* shared_context_provider, | 60 ContextProviderCommandBuffer* shared_context_provider, |
61 command_buffer_metrics::ContextType type); | 61 command_buffer_metrics::ContextType type); |
62 | 62 |
63 gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); | 63 gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); |
64 // Gives the GL internal format that should be used for calling CopyTexImage2D | 64 // Gives the GL internal format that should be used for calling CopyTexImage2D |
65 // on the default framebuffer. | 65 // on the default framebuffer. |
66 uint32_t GetCopyTextureInternalFormat(); | 66 uint32_t GetCopyTextureInternalFormat(); |
67 void FreeUnusedSharedMemory(); | |
68 | 67 |
69 // cc::ContextProvider implementation. | 68 // cc::ContextProvider implementation. |
70 bool BindToCurrentThread() override; | 69 bool BindToCurrentThread() override; |
71 void DetachFromThread() override; | 70 void DetachFromThread() override; |
72 gpu::gles2::GLES2Interface* ContextGL() override; | 71 gpu::gles2::GLES2Interface* ContextGL() override; |
73 gpu::ContextSupport* ContextSupport() override; | 72 gpu::ContextSupport* ContextSupport() override; |
74 class GrContext* GrContext() override; | 73 class GrContext* GrContext() override; |
75 cc::ContextCacheController* CacheController() override; | 74 cc::ContextCacheController* CacheController() override; |
76 void InvalidateGrContext(uint32_t state) override; | 75 void InvalidateGrContext(uint32_t state) override; |
77 base::Lock* GetLock() override; | 76 base::Lock* GetLock() override; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 std::unique_ptr<gpu::gles2::GLES2TraceImplementation> trace_impl_; | 129 std::unique_ptr<gpu::gles2::GLES2TraceImplementation> trace_impl_; |
131 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; | 130 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; |
132 std::unique_ptr<cc::ContextCacheController> cache_controller_; | 131 std::unique_ptr<cc::ContextCacheController> cache_controller_; |
133 | 132 |
134 LostContextCallback lost_context_callback_; | 133 LostContextCallback lost_context_callback_; |
135 }; | 134 }; |
136 | 135 |
137 } // namespace content | 136 } // namespace content |
138 | 137 |
139 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ | 138 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ |
OLD | NEW |