| 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 14 matching lines...) Expand all  Loading... | 
| 25 } | 25 } | 
| 26 | 26 | 
| 27 namespace android_webview { | 27 namespace android_webview { | 
| 28 | 28 | 
| 29 class AwRenderThreadContextProvider : public cc::ContextProvider { | 29 class AwRenderThreadContextProvider : public cc::ContextProvider { | 
| 30  public: | 30  public: | 
| 31   static scoped_refptr<AwRenderThreadContextProvider> Create( | 31   static scoped_refptr<AwRenderThreadContextProvider> Create( | 
| 32       scoped_refptr<gl::GLSurface> surface, | 32       scoped_refptr<gl::GLSurface> surface, | 
| 33       scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 33       scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 
| 34 | 34 | 
|  | 35   // Gives the GL internal format that should be used for calling CopyTexImage2D | 
|  | 36   // on the default framebuffer. | 
|  | 37   uint32_t GetCopyTextureInternalFormat(); | 
|  | 38 | 
| 35  private: | 39  private: | 
| 36   AwRenderThreadContextProvider( | 40   AwRenderThreadContextProvider( | 
| 37       scoped_refptr<gl::GLSurface> surface, | 41       scoped_refptr<gl::GLSurface> surface, | 
| 38       scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 42       scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 
| 39   ~AwRenderThreadContextProvider() override; | 43   ~AwRenderThreadContextProvider() override; | 
| 40 | 44 | 
| 41   // cc::ContextProvider: | 45   // cc::ContextProvider: | 
| 42   bool BindToCurrentThread() override; | 46   bool BindToCurrentThread() override; | 
| 43   gpu::Capabilities ContextCapabilities() override; | 47   gpu::Capabilities ContextCapabilities() override; | 
| 44   gpu::gles2::GLES2Interface* ContextGL() override; | 48   gpu::gles2::GLES2Interface* ContextGL() override; | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 58   sk_sp<class GrContext> gr_context_; | 62   sk_sp<class GrContext> gr_context_; | 
| 59 | 63 | 
| 60   LostContextCallback lost_context_callback_; | 64   LostContextCallback lost_context_callback_; | 
| 61 | 65 | 
| 62   DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); | 66   DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); | 
| 63 }; | 67 }; | 
| 64 | 68 | 
| 65 }  // namespace android_webview | 69 }  // namespace android_webview | 
| 66 | 70 | 
| 67 #endif  // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ | 71 #endif  // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ | 
| OLD | NEW | 
|---|