OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CC_OUTPUT_CONTEXT_PROVIDER_H_ | 5 #ifndef CC_OUTPUT_CONTEXT_PROVIDER_H_ |
6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_ | 6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 // from the same thread. | 32 // from the same thread. |
33 virtual bool BindToCurrentThread() = 0; | 33 virtual bool BindToCurrentThread() = 0; |
34 virtual void DetachFromThread() {} | 34 virtual void DetachFromThread() {} |
35 | 35 |
36 virtual gpu::gles2::GLES2Interface* ContextGL() = 0; | 36 virtual gpu::gles2::GLES2Interface* ContextGL() = 0; |
37 virtual gpu::ContextSupport* ContextSupport() = 0; | 37 virtual gpu::ContextSupport* ContextSupport() = 0; |
38 virtual class GrContext* GrContext() = 0; | 38 virtual class GrContext* GrContext() = 0; |
39 | 39 |
40 struct Capabilities { | 40 struct Capabilities { |
41 gpu::Capabilities gpu; | 41 gpu::Capabilities gpu; |
42 size_t max_transfer_buffer_usage_bytes; | |
43 | 42 |
44 CC_EXPORT Capabilities(); | 43 CC_EXPORT Capabilities(); |
45 }; | 44 }; |
46 | 45 |
47 // Invalidates the cached OpenGL state in GrContext. | 46 // Invalidates the cached OpenGL state in GrContext. |
48 // See skia GrContext::resetContext for details. | 47 // See skia GrContext::resetContext for details. |
49 virtual void InvalidateGrContext(uint32_t state) = 0; | 48 virtual void InvalidateGrContext(uint32_t state) = 0; |
50 | 49 |
51 // Sets up a lock so this context can be used from multiple threads. | 50 // Sets up a lock so this context can be used from multiple threads. |
52 virtual void SetupLock() = 0; | 51 virtual void SetupLock() = 0; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0; | 85 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0; |
87 | 86 |
88 protected: | 87 protected: |
89 friend class base::RefCountedThreadSafe<ContextProvider>; | 88 friend class base::RefCountedThreadSafe<ContextProvider>; |
90 virtual ~ContextProvider() {} | 89 virtual ~ContextProvider() {} |
91 }; | 90 }; |
92 | 91 |
93 } // namespace cc | 92 } // namespace cc |
94 | 93 |
95 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ | 94 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ |
OLD | NEW |