| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ResourceFormat best_render_buffer_format() const { | 99 ResourceFormat best_render_buffer_format() const { |
| 100 return best_render_buffer_format_; | 100 return best_render_buffer_format_; |
| 101 } | 101 } |
| 102 ResourceFormat yuv_resource_format() const { return yuv_resource_format_; } | 102 ResourceFormat yuv_resource_format() const { return yuv_resource_format_; } |
| 103 bool use_sync_query() const { return use_sync_query_; } | 103 bool use_sync_query() const { return use_sync_query_; } |
| 104 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { | 104 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { |
| 105 return gpu_memory_buffer_manager_; | 105 return gpu_memory_buffer_manager_; |
| 106 } | 106 } |
| 107 size_t num_resources() const { return resources_.size(); } | 107 size_t num_resources() const { return resources_.size(); } |
| 108 | 108 |
| 109 bool IsResourceFormatSupported(ResourceFormat format) const; |
| 110 |
| 109 // Checks whether a resource is in use by a consumer. | 111 // Checks whether a resource is in use by a consumer. |
| 110 bool InUseByConsumer(ResourceId id); | 112 bool InUseByConsumer(ResourceId id); |
| 111 | 113 |
| 112 bool IsLost(ResourceId id); | 114 bool IsLost(ResourceId id); |
| 113 | 115 |
| 114 void LoseResourceForTesting(ResourceId id); | 116 void LoseResourceForTesting(ResourceId id); |
| 115 void EnableReadLockFencesForTesting(ResourceId id); | 117 void EnableReadLockFencesForTesting(ResourceId id); |
| 116 | 118 |
| 117 // Producer interface. | 119 // Producer interface. |
| 118 | 120 |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 // A process-unique ID used for disambiguating memory dumps from different | 596 // A process-unique ID used for disambiguating memory dumps from different |
| 595 // resource providers. | 597 // resource providers. |
| 596 int tracing_id_; | 598 int tracing_id_; |
| 597 | 599 |
| 598 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 600 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 599 }; | 601 }; |
| 600 | 602 |
| 601 } // namespace cc | 603 } // namespace cc |
| 602 | 604 |
| 603 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 605 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |