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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 ResourceFormat best_render_buffer_format() const { | 104 ResourceFormat best_render_buffer_format() const { |
105 return best_render_buffer_format_; | 105 return best_render_buffer_format_; |
106 } | 106 } |
107 ResourceFormat YuvResourceFormat(int bits) const; | 107 ResourceFormat YuvResourceFormat(int bits) const; |
108 bool use_sync_query() const { return use_sync_query_; } | 108 bool use_sync_query() const { return use_sync_query_; } |
109 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { | 109 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { |
110 return gpu_memory_buffer_manager_; | 110 return gpu_memory_buffer_manager_; |
111 } | 111 } |
112 size_t num_resources() const { return resources_.size(); } | 112 size_t num_resources() const { return resources_.size(); } |
113 | 113 |
| 114 bool IsResourceFormatSupported(ResourceFormat format) const; |
| 115 |
114 // Checks whether a resource is in use by a consumer. | 116 // Checks whether a resource is in use by a consumer. |
115 bool InUseByConsumer(ResourceId id); | 117 bool InUseByConsumer(ResourceId id); |
116 | 118 |
117 bool IsLost(ResourceId id); | 119 bool IsLost(ResourceId id); |
118 | 120 |
119 void LoseResourceForTesting(ResourceId id); | 121 void LoseResourceForTesting(ResourceId id); |
120 void EnableReadLockFencesForTesting(ResourceId id); | 122 void EnableReadLockFencesForTesting(ResourceId id); |
121 | 123 |
122 // Producer interface. | 124 // Producer interface. |
123 | 125 |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 // A process-unique ID used for disambiguating memory dumps from different | 676 // A process-unique ID used for disambiguating memory dumps from different |
675 // resource providers. | 677 // resource providers. |
676 int tracing_id_; | 678 int tracing_id_; |
677 | 679 |
678 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 680 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
679 }; | 681 }; |
680 | 682 |
681 } // namespace cc | 683 } // namespace cc |
682 | 684 |
683 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 685 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |