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 COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ | 5 #ifndef COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ |
6 #define COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ | 6 #define COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Capabilities ContextCapabilities() override; | 48 Capabilities ContextCapabilities() override; |
49 void VerifyContexts() override {} | 49 void VerifyContexts() override {} |
50 void DeleteCachedResources() override {} | 50 void DeleteCachedResources() override {} |
51 bool DestroyedOnMainThread() override; | 51 bool DestroyedOnMainThread() override; |
52 void SetLostContextCallback( | 52 void SetLostContextCallback( |
53 const LostContextCallback& lost_context_callback) override; | 53 const LostContextCallback& lost_context_callback) override; |
54 void SetMemoryPolicyChangedCallback( | |
55 const MemoryPolicyChangedCallback& memory_policy_changed_callback) | |
56 override {} | |
57 void SetupLock() override; | 54 void SetupLock() override; |
58 base::Lock* GetLock() override; | 55 base::Lock* GetLock() override; |
59 | 56 |
60 protected: | 57 protected: |
61 friend class base::RefCountedThreadSafe<SurfacesContextProvider>; | 58 friend class base::RefCountedThreadSafe<SurfacesContextProvider>; |
62 ~SurfacesContextProvider() override; | 59 ~SurfacesContextProvider() override; |
63 | 60 |
64 private: | 61 private: |
65 // CommandBufferLocalClient: | 62 // CommandBufferLocalClient: |
66 void UpdateVSyncParameters(int64_t timebase, int64_t interval) override; | 63 void UpdateVSyncParameters(int64_t timebase, int64_t interval) override; |
(...skipping 13 matching lines...) Expand all Loading... |
80 scoped_ptr<CommandBufferLocal> command_buffer_local_; | 77 scoped_ptr<CommandBufferLocal> command_buffer_local_; |
81 | 78 |
82 base::Lock context_lock_; | 79 base::Lock context_lock_; |
83 | 80 |
84 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider); | 81 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider); |
85 }; | 82 }; |
86 | 83 |
87 } // namespace mus | 84 } // namespace mus |
88 | 85 |
89 #endif // COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ | 86 #endif // COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ |
OLD | NEW |