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

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

Issue 2547683003: Reland "Fix HTML5 video blurry" (Closed)
Patch Set: rebase to ToT Created 4 years 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 void Initialize(); 95 void Initialize();
96 96
97 void DidLoseContextProvider() { lost_context_provider_ = true; } 97 void DidLoseContextProvider() { lost_context_provider_ = true; }
98 98
99 int max_texture_size() const { return max_texture_size_; } 99 int max_texture_size() const { return max_texture_size_; }
100 ResourceFormat best_texture_format() const { return best_texture_format_; } 100 ResourceFormat best_texture_format() const { return best_texture_format_; }
101 ResourceFormat best_render_buffer_format() const { 101 ResourceFormat best_render_buffer_format() const {
102 return best_render_buffer_format_; 102 return best_render_buffer_format_;
103 } 103 }
104 ResourceFormat YuvResourceFormat(int bits) const;
105 bool use_sync_query() const { return use_sync_query_; } 104 bool use_sync_query() const { return use_sync_query_; }
106 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() { 105 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() {
107 return gpu_memory_buffer_manager_; 106 return gpu_memory_buffer_manager_;
108 } 107 }
109 size_t num_resources() const { return resources_.size(); } 108 size_t num_resources() const { return resources_.size(); }
110 109
111 bool IsResourceFormatSupported(ResourceFormat format) const; 110 bool IsResourceFormatSupported(ResourceFormat format) const;
112 111
113 // Checks whether a resource is in use by a consumer. 112 // Checks whether a resource is in use by a consumer.
114 bool InUseByConsumer(ResourceId id); 113 bool InUseByConsumer(ResourceId id);
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 int next_child_; 682 int next_child_;
684 ChildMap children_; 683 ChildMap children_;
685 684
686 const bool delegated_sync_points_required_; 685 const bool delegated_sync_points_required_;
687 686
688 ResourceType default_resource_type_; 687 ResourceType default_resource_type_;
689 bool use_texture_storage_ext_; 688 bool use_texture_storage_ext_;
690 bool use_texture_format_bgra_; 689 bool use_texture_format_bgra_;
691 bool use_texture_usage_hint_; 690 bool use_texture_usage_hint_;
692 bool use_compressed_texture_etc1_; 691 bool use_compressed_texture_etc1_;
693 ResourceFormat yuv_resource_format_;
694 ResourceFormat yuv_highbit_resource_format_;
695 int max_texture_size_; 692 int max_texture_size_;
696 ResourceFormat best_texture_format_; 693 ResourceFormat best_texture_format_;
697 ResourceFormat best_render_buffer_format_; 694 ResourceFormat best_render_buffer_format_;
698 const bool enable_color_correct_rendering_ = false; 695 const bool enable_color_correct_rendering_ = false;
699 696
700 base::ThreadChecker thread_checker_; 697 base::ThreadChecker thread_checker_;
701 698
702 scoped_refptr<Fence> current_read_lock_fence_; 699 scoped_refptr<Fence> current_read_lock_fence_;
703 700
704 const size_t id_allocation_chunk_size_; 701 const size_t id_allocation_chunk_size_;
705 std::unique_ptr<IdAllocator> texture_id_allocator_; 702 std::unique_ptr<IdAllocator> texture_id_allocator_;
706 std::unique_ptr<IdAllocator> buffer_id_allocator_; 703 std::unique_ptr<IdAllocator> buffer_id_allocator_;
707 704
708 bool use_sync_query_; 705 bool use_sync_query_;
709 BufferToTextureTargetMap buffer_to_texture_target_map_; 706 BufferToTextureTargetMap buffer_to_texture_target_map_;
710 707
711 // A process-unique ID used for disambiguating memory dumps from different 708 // A process-unique ID used for disambiguating memory dumps from different
712 // resource providers. 709 // resource providers.
713 int tracing_id_; 710 int tracing_id_;
714 711
715 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); 712 DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
716 }; 713 };
717 714
718 } // namespace cc 715 } // namespace cc
719 716
720 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 717 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698