| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SERVICES_UI_PUBLIC_CPP_CONTEXT_PROVIDER_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_CONTEXT_PROVIDER_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_CONTEXT_PROVIDER_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_CONTEXT_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 class ContextProvider : public cc::ContextProvider { | 28 class ContextProvider : public cc::ContextProvider { |
| 29 public: | 29 public: |
| 30 explicit ContextProvider(scoped_refptr<gpu::GpuChannelHost> gpu_channel_host); | 30 explicit ContextProvider(scoped_refptr<gpu::GpuChannelHost> gpu_channel_host); |
| 31 | 31 |
| 32 // cc::ContextProvider implementation. | 32 // cc::ContextProvider implementation. |
| 33 bool BindToCurrentThread() override; | 33 bool BindToCurrentThread() override; |
| 34 gpu::gles2::GLES2Interface* ContextGL() override; | 34 gpu::gles2::GLES2Interface* ContextGL() override; |
| 35 gpu::ContextSupport* ContextSupport() override; | 35 gpu::ContextSupport* ContextSupport() override; |
| 36 class GrContext* GrContext() override; | 36 class GrContext* GrContext() override; |
| 37 cc::ContextCacheController* CacheController() override; |
| 37 void InvalidateGrContext(uint32_t state) override; | 38 void InvalidateGrContext(uint32_t state) override; |
| 38 base::Lock* GetLock() override; | 39 base::Lock* GetLock() override; |
| 39 gpu::Capabilities ContextCapabilities() override; | 40 gpu::Capabilities ContextCapabilities() override; |
| 40 void DeleteCachedResources() override {} | |
| 41 void SetLostContextCallback( | 41 void SetLostContextCallback( |
| 42 const LostContextCallback& lost_context_callback) override {} | 42 const LostContextCallback& lost_context_callback) override {} |
| 43 | 43 |
| 44 protected: | 44 protected: |
| 45 friend class base::RefCountedThreadSafe<ContextProvider>; | 45 friend class base::RefCountedThreadSafe<ContextProvider>; |
| 46 ~ContextProvider() override; | 46 ~ContextProvider() override; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 std::unique_ptr<GLES2Context> context_; | 49 std::unique_ptr<GLES2Context> context_; |
| 50 std::unique_ptr<cc::ContextCacheController> cache_controller_; |
| 50 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host_; | 51 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host_; |
| 51 | 52 |
| 52 DISALLOW_COPY_AND_ASSIGN(ContextProvider); | 53 DISALLOW_COPY_AND_ASSIGN(ContextProvider); |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // namespace ui | 56 } // namespace ui |
| 56 | 57 |
| 57 #endif // SERVICES_UI_PUBLIC_CPP_CONTEXT_PROVIDER_H_ | 58 #endif // SERVICES_UI_PUBLIC_CPP_CONTEXT_PROVIDER_H_ |
| OLD | NEW |