| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 ResourceFormat best_render_buffer_format() const { | 102 ResourceFormat best_render_buffer_format() const { |
| 103 return settings_.best_render_buffer_format; | 103 return settings_.best_render_buffer_format; |
| 104 } | 104 } |
| 105 ResourceFormat YuvResourceFormat(int bits) const; | 105 ResourceFormat YuvResourceFormat(int bits) const; |
| 106 bool use_sync_query() const { return settings_.use_sync_query; } | 106 bool use_sync_query() const { return settings_.use_sync_query; } |
| 107 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { | 107 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { |
| 108 return gpu_memory_buffer_manager_; | 108 return gpu_memory_buffer_manager_; |
| 109 } | 109 } |
| 110 size_t num_resources() const { return resources_.size(); } | 110 size_t num_resources() const { return resources_.size(); } |
| 111 | 111 |
| 112 bool IsResourceFormatSupported(ResourceFormat format) const; | 112 bool IsTextureFormatSupported(ResourceFormat format) const; |
| 113 |
| 114 // Returns true if the provided |format| can be used as a render buffer. |
| 115 // Note that render buffer support implies texture support. |
| 116 bool IsRenderBufferFormatSupported(ResourceFormat format) const; |
| 113 | 117 |
| 114 // Checks whether a resource is in use by a consumer. | 118 // Checks whether a resource is in use by a consumer. |
| 115 bool InUseByConsumer(ResourceId id); | 119 bool InUseByConsumer(ResourceId id); |
| 116 | 120 |
| 117 bool IsLost(ResourceId id); | 121 bool IsLost(ResourceId id); |
| 118 | 122 |
| 119 void LoseResourceForTesting(ResourceId id); | 123 void LoseResourceForTesting(ResourceId id); |
| 120 void EnableReadLockFencesForTesting(ResourceId id); | 124 void EnableReadLockFencesForTesting(ResourceId id); |
| 121 | 125 |
| 122 // Producer interface. | 126 // Producer interface. |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 // Set of resource Ids that would like to be notified about promotion hints. | 788 // Set of resource Ids that would like to be notified about promotion hints. |
| 785 ResourceIdSet wants_promotion_hints_set_; | 789 ResourceIdSet wants_promotion_hints_set_; |
| 786 #endif | 790 #endif |
| 787 | 791 |
| 788 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 792 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 789 }; | 793 }; |
| 790 | 794 |
| 791 } // namespace cc | 795 } // namespace cc |
| 792 | 796 |
| 793 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 797 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |