OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_RESOURCES_RESOURCE_PROVIDER_H_ | 5 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_ |
6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ | 6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 bool use_persistent_map_for_gpu_memory_buffers() const { | 101 bool use_persistent_map_for_gpu_memory_buffers() const { |
102 return use_persistent_map_for_gpu_memory_buffers_; | 102 return use_persistent_map_for_gpu_memory_buffers_; |
103 } | 103 } |
104 size_t num_resources() const { return resources_.size(); } | 104 size_t num_resources() const { return resources_.size(); } |
105 | 105 |
106 // Checks whether a resource is in use by a consumer. | 106 // Checks whether a resource is in use by a consumer. |
107 bool InUseByConsumer(ResourceId id); | 107 bool InUseByConsumer(ResourceId id); |
108 | 108 |
109 bool IsLost(ResourceId id); | 109 bool IsLost(ResourceId id); |
110 | 110 |
111 void EnableReadLockFences(ResourceId id); | |
piman
2015/06/12 01:53:52
nit: EnableReadLockFencesForTesting.
Daniele Castagna
2015/06/12 23:36:42
We're actually planning to use this method for vid
| |
112 | |
111 // Producer interface. | 113 // Producer interface. |
112 | 114 |
113 ResourceType default_resource_type() const { return default_resource_type_; } | 115 ResourceType default_resource_type() const { return default_resource_type_; } |
114 ResourceType GetResourceType(ResourceId id); | 116 ResourceType GetResourceType(ResourceId id); |
115 | 117 |
116 // Creates a resource of the default resource type. | 118 // Creates a resource of the default resource type. |
117 ResourceId CreateResource(const gfx::Size& size, | 119 ResourceId CreateResource(const gfx::Size& size, |
118 GLint wrap_mode, | 120 GLint wrap_mode, |
119 TextureHint hint, | 121 TextureHint hint, |
120 ResourceFormat format); | 122 ResourceFormat format); |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
663 return format_gl_data_format[format]; | 665 return format_gl_data_format[format]; |
664 } | 666 } |
665 | 667 |
666 inline GLenum GLInternalFormat(ResourceFormat format) { | 668 inline GLenum GLInternalFormat(ResourceFormat format) { |
667 return GLDataFormat(format); | 669 return GLDataFormat(format); |
668 } | 670 } |
669 | 671 |
670 } // namespace cc | 672 } // namespace cc |
671 | 673 |
672 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 674 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |