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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 int highp_threshold_min, | 95 int highp_threshold_min, |
96 size_t id_allocation_chunk_size, | 96 size_t id_allocation_chunk_size, |
97 bool delegated_sync_points_required, | 97 bool delegated_sync_points_required, |
98 bool use_gpu_memory_buffer_resources, | 98 bool use_gpu_memory_buffer_resources, |
99 bool enable_color_correct_rendering, | 99 bool enable_color_correct_rendering, |
100 const BufferToTextureTargetMap& buffer_to_texture_target_map); | 100 const BufferToTextureTargetMap& buffer_to_texture_target_map); |
101 ~ResourceProvider() override; | 101 ~ResourceProvider() override; |
102 | 102 |
103 void Initialize(); | 103 void Initialize(); |
104 | 104 |
105 void DidLoseOutputSurface() { lost_output_surface_ = true; } | 105 void DidLoseContextProvider() { lost_context_provider_ = true; } |
106 | 106 |
107 int max_texture_size() const { return max_texture_size_; } | 107 int max_texture_size() const { return max_texture_size_; } |
108 ResourceFormat best_texture_format() const { return best_texture_format_; } | 108 ResourceFormat best_texture_format() const { return best_texture_format_; } |
109 ResourceFormat best_render_buffer_format() const { | 109 ResourceFormat best_render_buffer_format() const { |
110 return best_render_buffer_format_; | 110 return best_render_buffer_format_; |
111 } | 111 } |
112 ResourceFormat YuvResourceFormat(int bits) const; | 112 ResourceFormat YuvResourceFormat(int bits) const; |
113 bool use_sync_query() const { return use_sync_query_; } | 113 bool use_sync_query() const { return use_sync_query_; } |
114 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { | 114 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { |
115 return gpu_memory_buffer_manager_; | 115 return gpu_memory_buffer_manager_; |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 gpu::gles2::GLES2Interface* ContextGL() const; | 673 gpu::gles2::GLES2Interface* ContextGL() const; |
674 bool IsGLContextLost() const; | 674 bool IsGLContextLost() const; |
675 | 675 |
676 // Returns null if |enable_color_correct_rendering_| is false. | 676 // Returns null if |enable_color_correct_rendering_| is false. |
677 sk_sp<SkColorSpace> GetResourceSkColorSpace(const Resource* resource) const; | 677 sk_sp<SkColorSpace> GetResourceSkColorSpace(const Resource* resource) const; |
678 | 678 |
679 ContextProvider* compositor_context_provider_; | 679 ContextProvider* compositor_context_provider_; |
680 SharedBitmapManager* shared_bitmap_manager_; | 680 SharedBitmapManager* shared_bitmap_manager_; |
681 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 681 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
682 BlockingTaskRunner* blocking_main_thread_task_runner_; | 682 BlockingTaskRunner* blocking_main_thread_task_runner_; |
683 bool lost_output_surface_; | 683 bool lost_context_provider_; |
684 int highp_threshold_min_; | 684 int highp_threshold_min_; |
685 ResourceId next_id_; | 685 ResourceId next_id_; |
686 ResourceMap resources_; | 686 ResourceMap resources_; |
687 int next_child_; | 687 int next_child_; |
688 ChildMap children_; | 688 ChildMap children_; |
689 | 689 |
690 const bool delegated_sync_points_required_; | 690 const bool delegated_sync_points_required_; |
691 | 691 |
692 ResourceType default_resource_type_; | 692 ResourceType default_resource_type_; |
693 bool use_texture_storage_ext_; | 693 bool use_texture_storage_ext_; |
(...skipping 21 matching lines...) Expand all Loading... |
715 // A process-unique ID used for disambiguating memory dumps from different | 715 // A process-unique ID used for disambiguating memory dumps from different |
716 // resource providers. | 716 // resource providers. |
717 int tracing_id_; | 717 int tracing_id_; |
718 | 718 |
719 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 719 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
720 }; | 720 }; |
721 | 721 |
722 } // namespace cc | 722 } // namespace cc |
723 | 723 |
724 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 724 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |