| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void Initialize(); | 99 void Initialize(); |
| 100 | 100 |
| 101 void DidLoseOutputSurface() { lost_output_surface_ = true; } | 101 void DidLoseOutputSurface() { lost_output_surface_ = true; } |
| 102 | 102 |
| 103 int max_texture_size() const { return max_texture_size_; } | 103 int max_texture_size() const { return max_texture_size_; } |
| 104 ResourceFormat best_texture_format() const { return best_texture_format_; } | 104 ResourceFormat best_texture_format() const { return best_texture_format_; } |
| 105 ResourceFormat best_render_buffer_format() const { | 105 ResourceFormat best_render_buffer_format() const { |
| 106 return best_render_buffer_format_; | 106 return best_render_buffer_format_; |
| 107 } | 107 } |
| 108 ResourceFormat YuvResourceFormat(int bits) const; | 108 ResourceFormat YuvResourceFormat(int bits) const; |
| 109 ResourceFormat Y16ResourceFormat(int bits) const; |
| 109 bool use_sync_query() const { return use_sync_query_; } | 110 bool use_sync_query() const { return use_sync_query_; } |
| 110 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { | 111 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { |
| 111 return gpu_memory_buffer_manager_; | 112 return gpu_memory_buffer_manager_; |
| 112 } | 113 } |
| 113 size_t num_resources() const { return resources_.size(); } | 114 size_t num_resources() const { return resources_.size(); } |
| 114 | 115 |
| 115 bool IsResourceFormatSupported(ResourceFormat format) const; | 116 bool IsResourceFormatSupported(ResourceFormat format) const; |
| 116 | 117 |
| 117 // Checks whether a resource is in use by a consumer. | 118 // Checks whether a resource is in use by a consumer. |
| 118 bool InUseByConsumer(ResourceId id); | 119 bool InUseByConsumer(ResourceId id); |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 | 673 |
| 673 const bool delegated_sync_points_required_; | 674 const bool delegated_sync_points_required_; |
| 674 | 675 |
| 675 ResourceType default_resource_type_; | 676 ResourceType default_resource_type_; |
| 676 bool use_texture_storage_ext_; | 677 bool use_texture_storage_ext_; |
| 677 bool use_texture_format_bgra_; | 678 bool use_texture_format_bgra_; |
| 678 bool use_texture_usage_hint_; | 679 bool use_texture_usage_hint_; |
| 679 bool use_compressed_texture_etc1_; | 680 bool use_compressed_texture_etc1_; |
| 680 ResourceFormat yuv_resource_format_; | 681 ResourceFormat yuv_resource_format_; |
| 681 ResourceFormat yuv_highbit_resource_format_; | 682 ResourceFormat yuv_highbit_resource_format_; |
| 683 ResourceFormat y16_resource_format_; |
| 682 int max_texture_size_; | 684 int max_texture_size_; |
| 683 ResourceFormat best_texture_format_; | 685 ResourceFormat best_texture_format_; |
| 684 ResourceFormat best_render_buffer_format_; | 686 ResourceFormat best_render_buffer_format_; |
| 685 | 687 |
| 686 base::ThreadChecker thread_checker_; | 688 base::ThreadChecker thread_checker_; |
| 687 | 689 |
| 688 scoped_refptr<Fence> current_read_lock_fence_; | 690 scoped_refptr<Fence> current_read_lock_fence_; |
| 689 | 691 |
| 690 const size_t id_allocation_chunk_size_; | 692 const size_t id_allocation_chunk_size_; |
| 691 std::unique_ptr<IdAllocator> texture_id_allocator_; | 693 std::unique_ptr<IdAllocator> texture_id_allocator_; |
| 692 std::unique_ptr<IdAllocator> buffer_id_allocator_; | 694 std::unique_ptr<IdAllocator> buffer_id_allocator_; |
| 693 | 695 |
| 694 bool use_sync_query_; | 696 bool use_sync_query_; |
| 695 std::vector<unsigned> use_image_texture_targets_; | 697 std::vector<unsigned> use_image_texture_targets_; |
| 696 | 698 |
| 697 // A process-unique ID used for disambiguating memory dumps from different | 699 // A process-unique ID used for disambiguating memory dumps from different |
| 698 // resource providers. | 700 // resource providers. |
| 699 int tracing_id_; | 701 int tracing_id_; |
| 700 | 702 |
| 701 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 703 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 702 }; | 704 }; |
| 703 | 705 |
| 704 } // namespace cc | 706 } // namespace cc |
| 705 | 707 |
| 706 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 708 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |