OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 30 matching lines...) Expand all Loading... |
41 scoped_refptr<gl::GLSurface> surface, | 41 scoped_refptr<gl::GLSurface> surface, |
42 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 42 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); |
43 ~AwRenderThreadContextProvider() override; | 43 ~AwRenderThreadContextProvider() override; |
44 | 44 |
45 // cc::ContextProvider: | 45 // cc::ContextProvider: |
46 bool BindToCurrentThread() override; | 46 bool BindToCurrentThread() override; |
47 gpu::Capabilities ContextCapabilities() override; | 47 gpu::Capabilities ContextCapabilities() override; |
48 gpu::gles2::GLES2Interface* ContextGL() override; | 48 gpu::gles2::GLES2Interface* ContextGL() override; |
49 gpu::ContextSupport* ContextSupport() override; | 49 gpu::ContextSupport* ContextSupport() override; |
50 class GrContext* GrContext() override; | 50 class GrContext* GrContext() override; |
| 51 cc::ContextCacheController* CacheController() override; |
51 void InvalidateGrContext(uint32_t state) override; | 52 void InvalidateGrContext(uint32_t state) override; |
52 base::Lock* GetLock() override; | 53 base::Lock* GetLock() override; |
53 void DeleteCachedResources() override; | |
54 void SetLostContextCallback( | 54 void SetLostContextCallback( |
55 const LostContextCallback& lost_context_callback) override; | 55 const LostContextCallback& lost_context_callback) override; |
56 | 56 |
57 void OnLostContext(); | 57 void OnLostContext(); |
58 | 58 |
59 base::ThreadChecker main_thread_checker_; | 59 base::ThreadChecker main_thread_checker_; |
60 | 60 |
61 std::unique_ptr<gpu::GLInProcessContext> context_; | 61 std::unique_ptr<gpu::GLInProcessContext> context_; |
62 sk_sp<class GrContext> gr_context_; | 62 sk_sp<class GrContext> gr_context_; |
| 63 std::unique_ptr<cc::ContextCacheController> cache_controller_; |
63 | 64 |
64 LostContextCallback lost_context_callback_; | 65 LostContextCallback lost_context_callback_; |
65 | 66 |
66 DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); | 67 DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); |
67 }; | 68 }; |
68 | 69 |
69 } // namespace android_webview | 70 } // namespace android_webview |
70 | 71 |
71 #endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ | 72 #endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ |
OLD | NEW |