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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 int next_child_; | 793 int next_child_; |
794 ChildMap children_; | 794 ChildMap children_; |
795 scoped_refptr<Fence> current_read_lock_fence_; | 795 scoped_refptr<Fence> current_read_lock_fence_; |
796 std::unique_ptr<TextureIdAllocator> texture_id_allocator_; | 796 std::unique_ptr<TextureIdAllocator> texture_id_allocator_; |
797 BufferToTextureTargetMap buffer_to_texture_target_map_; | 797 BufferToTextureTargetMap buffer_to_texture_target_map_; |
798 | 798 |
799 // Keep track of whether deleted resources should be batched up or returned | 799 // Keep track of whether deleted resources should be batched up or returned |
800 // immediately. | 800 // immediately. |
801 bool batch_return_resources_ = false; | 801 bool batch_return_resources_ = false; |
802 // Maps from a child id to the set of resources to be returned to it. | 802 // Maps from a child id to the set of resources to be returned to it. |
803 base::SmallMap<std::map<int, ResourceIdArray>> batched_returning_resources_; | 803 base::small_map<std::map<int, ResourceIdArray>> batched_returning_resources_; |
804 | 804 |
805 base::ThreadChecker thread_checker_; | 805 base::ThreadChecker thread_checker_; |
806 | 806 |
807 // A process-unique ID used for disambiguating memory dumps from different | 807 // A process-unique ID used for disambiguating memory dumps from different |
808 // resource providers. | 808 // resource providers. |
809 int tracing_id_; | 809 int tracing_id_; |
810 | 810 |
811 #if defined(OS_ANDROID) | 811 #if defined(OS_ANDROID) |
812 // Set of resource Ids that would like to be notified about promotion hints. | 812 // Set of resource Ids that would like to be notified about promotion hints. |
813 ResourceIdSet wants_promotion_hints_set_; | 813 ResourceIdSet wants_promotion_hints_set_; |
814 #endif | 814 #endif |
815 | 815 |
816 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 816 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
817 }; | 817 }; |
818 | 818 |
819 } // namespace cc | 819 } // namespace cc |
820 | 820 |
821 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 821 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |