| 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 | |
| 111 // Checks whether a resource is in use by a consumer. | 109 // Checks whether a resource is in use by a consumer. |
| 112 bool InUseByConsumer(ResourceId id); | 110 bool InUseByConsumer(ResourceId id); |
| 113 | 111 |
| 114 bool IsLost(ResourceId id); | 112 bool IsLost(ResourceId id); |
| 115 | 113 |
| 116 void LoseResourceForTesting(ResourceId id); | 114 void LoseResourceForTesting(ResourceId id); |
| 117 void EnableReadLockFencesForTesting(ResourceId id); | 115 void EnableReadLockFencesForTesting(ResourceId id); |
| 118 | 116 |
| 119 // Producer interface. | 117 // Producer interface. |
| 120 | 118 |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 // A process-unique ID used for disambiguating memory dumps from different | 594 // A process-unique ID used for disambiguating memory dumps from different |
| 597 // resource providers. | 595 // resource providers. |
| 598 int tracing_id_; | 596 int tracing_id_; |
| 599 | 597 |
| 600 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 598 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 601 }; | 599 }; |
| 602 | 600 |
| 603 } // namespace cc | 601 } // namespace cc |
| 604 | 602 |
| 605 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 603 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |