Chromium Code Reviews| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 } | 101 } |
| 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 |
|
ccameron
2017/03/23 22:20:14
You may want to add a comment saying that RenderBu
ericrk
2017/03/24 01:46:32
Added.
| |
| 112 bool IsResourceFormatSupported(ResourceFormat format) const; | 112 bool IsTextureFormatSupported(ResourceFormat format) const; |
| 113 bool IsRenderBufferFormatSupported(ResourceFormat format) const; | |
| 113 | 114 |
| 114 // Checks whether a resource is in use by a consumer. | 115 // Checks whether a resource is in use by a consumer. |
| 115 bool InUseByConsumer(ResourceId id); | 116 bool InUseByConsumer(ResourceId id); |
| 116 | 117 |
| 117 bool IsLost(ResourceId id); | 118 bool IsLost(ResourceId id); |
| 118 | 119 |
| 119 void LoseResourceForTesting(ResourceId id); | 120 void LoseResourceForTesting(ResourceId id); |
| 120 void EnableReadLockFencesForTesting(ResourceId id); | 121 void EnableReadLockFencesForTesting(ResourceId id); |
| 121 | 122 |
| 122 // Producer interface. | 123 // 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. | 785 // Set of resource Ids that would like to be notified about promotion hints. |
| 785 ResourceIdSet wants_promotion_hints_set_; | 786 ResourceIdSet wants_promotion_hints_set_; |
| 786 #endif | 787 #endif |
| 787 | 788 |
| 788 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 789 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 789 }; | 790 }; |
| 790 | 791 |
| 791 } // namespace cc | 792 } // namespace cc |
| 792 | 793 |
| 793 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 794 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |