| 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 22 matching lines...) Expand all Loading... |
| 33 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 33 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 AwRenderThreadContextProvider( | 36 AwRenderThreadContextProvider( |
| 37 scoped_refptr<gfx::GLSurface> surface, | 37 scoped_refptr<gfx::GLSurface> surface, |
| 38 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 38 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); |
| 39 ~AwRenderThreadContextProvider() override; | 39 ~AwRenderThreadContextProvider() override; |
| 40 | 40 |
| 41 // cc::ContextProvider: | 41 // cc::ContextProvider: |
| 42 bool BindToCurrentThread() override; | 42 bool BindToCurrentThread() override; |
| 43 Capabilities ContextCapabilities() override; | 43 gpu::Capabilities ContextCapabilities() override; |
| 44 gpu::gles2::GLES2Interface* ContextGL() override; | 44 gpu::gles2::GLES2Interface* ContextGL() override; |
| 45 gpu::ContextSupport* ContextSupport() override; | 45 gpu::ContextSupport* ContextSupport() override; |
| 46 class GrContext* GrContext() override; | 46 class GrContext* GrContext() override; |
| 47 void InvalidateGrContext(uint32_t state) override; | 47 void InvalidateGrContext(uint32_t state) override; |
| 48 void SetupLock() override; | 48 void SetupLock() override; |
| 49 base::Lock* GetLock() override; | 49 base::Lock* GetLock() override; |
| 50 void DeleteCachedResources() override; | 50 void DeleteCachedResources() override; |
| 51 void SetLostContextCallback( | 51 void SetLostContextCallback( |
| 52 const LostContextCallback& lost_context_callback) override; | 52 const LostContextCallback& lost_context_callback) override; |
| 53 | 53 |
| 54 void OnLostContext(); | 54 void OnLostContext(); |
| 55 | 55 |
| 56 base::ThreadChecker main_thread_checker_; | 56 base::ThreadChecker main_thread_checker_; |
| 57 | 57 |
| 58 std::unique_ptr<gpu::GLInProcessContext> context_; | 58 std::unique_ptr<gpu::GLInProcessContext> context_; |
| 59 sk_sp<class GrContext> gr_context_; | 59 sk_sp<class GrContext> gr_context_; |
| 60 | 60 |
| 61 cc::ContextProvider::Capabilities capabilities_; | |
| 62 | |
| 63 LostContextCallback lost_context_callback_; | 61 LostContextCallback lost_context_callback_; |
| 64 | 62 |
| 65 DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); | 63 DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); |
| 66 }; | 64 }; |
| 67 | 65 |
| 68 } // namespace android_webview | 66 } // namespace android_webview |
| 69 | 67 |
| 70 #endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ | 68 #endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ |
| OLD | NEW |