Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Side by Side Diff: cc/resources/resource_provider.h

Issue 1351283003: Allow task pools to reason about transparency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698