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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 BlockingTaskRunner* blocking_main_thread_task_runner, | 87 BlockingTaskRunner* blocking_main_thread_task_runner, |
88 int highp_threshold_min, | 88 int highp_threshold_min, |
89 bool use_rgba_4444_texture_format, | 89 bool use_rgba_4444_texture_format, |
90 size_t id_allocation_chunk_size, | 90 size_t id_allocation_chunk_size, |
91 const std::vector<unsigned>& use_image_texture_targets); | 91 const std::vector<unsigned>& use_image_texture_targets); |
92 ~ResourceProvider() override; | 92 ~ResourceProvider() override; |
93 | 93 |
94 void DidLoseOutputSurface() { lost_output_surface_ = true; } | 94 void DidLoseOutputSurface() { lost_output_surface_ = true; } |
95 | 95 |
96 int max_texture_size() const { return max_texture_size_; } | 96 int max_texture_size() const { return max_texture_size_; } |
97 ResourceFormat memory_efficient_texture_format() const { | 97 ResourceFormat memory_efficient_texture_format(bool must_support_alpha) const; |
reveman
2015/09/22 14:18:49
Can we remove this function from ResourceProvider
christiank
2015/09/23 12:29:12
Makes sense, fixed.
| |
98 return use_rgba_4444_texture_format_ ? RGBA_4444 : best_texture_format_; | |
99 } | |
100 ResourceFormat best_texture_format() const { return best_texture_format_; } | 98 ResourceFormat best_texture_format() const { return best_texture_format_; } |
101 ResourceFormat best_render_buffer_format() const { | 99 ResourceFormat best_render_buffer_format() const { |
102 return best_render_buffer_format_; | 100 return best_render_buffer_format_; |
103 } | 101 } |
104 ResourceFormat yuv_resource_format() const { return yuv_resource_format_; } | 102 ResourceFormat yuv_resource_format() const { return yuv_resource_format_; } |
105 bool use_sync_query() const { return use_sync_query_; } | 103 bool use_sync_query() const { return use_sync_query_; } |
106 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { | 104 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { |
107 return gpu_memory_buffer_manager_; | 105 return gpu_memory_buffer_manager_; |
108 } | 106 } |
109 size_t num_resources() const { return resources_.size(); } | 107 size_t num_resources() const { return resources_.size(); } |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
608 // A process-unique ID used for disambiguating memory dumps from different | 606 // A process-unique ID used for disambiguating memory dumps from different |
609 // resource providers. | 607 // resource providers. |
610 int tracing_id_; | 608 int tracing_id_; |
611 | 609 |
612 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 610 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
613 }; | 611 }; |
614 | 612 |
615 } // namespace cc | 613 } // namespace cc |
616 | 614 |
617 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 615 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |