Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: content/common/gpu/client/context_provider_command_buffer.h

Issue 2336043004: Android: Free GLHelper context ashmem when it makes sense (Closed)
Patch Set: address comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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();
danakj 2016/09/26 22:56:40 FWIW I think this should be part of ContextSupport
67 68
68 // cc::ContextProvider implementation. 69 // cc::ContextProvider implementation.
69 bool BindToCurrentThread() override; 70 bool BindToCurrentThread() override;
70 void DetachFromThread() override; 71 void DetachFromThread() override;
71 gpu::gles2::GLES2Interface* ContextGL() override; 72 gpu::gles2::GLES2Interface* ContextGL() override;
72 gpu::ContextSupport* ContextSupport() override; 73 gpu::ContextSupport* ContextSupport() override;
73 class GrContext* GrContext() override; 74 class GrContext* GrContext() override;
74 cc::ContextCacheController* CacheController() override; 75 cc::ContextCacheController* CacheController() override;
75 void InvalidateGrContext(uint32_t state) override; 76 void InvalidateGrContext(uint32_t state) override;
76 base::Lock* GetLock() override; 77 base::Lock* GetLock() override;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 std::unique_ptr<gpu::gles2::GLES2TraceImplementation> trace_impl_; 130 std::unique_ptr<gpu::gles2::GLES2TraceImplementation> trace_impl_;
130 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; 131 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
131 std::unique_ptr<cc::ContextCacheController> cache_controller_; 132 std::unique_ptr<cc::ContextCacheController> cache_controller_;
132 133
133 LostContextCallback lost_context_callback_; 134 LostContextCallback lost_context_callback_;
134 }; 135 };
135 136
136 } // namespace content 137 } // namespace content
137 138
138 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ 139 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698