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

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

Issue 1174733003: cc, gpu: Use RGBA when using msaa on systems that don't support BGRA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove added function no longer needed Created 5 years, 6 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool use_persistent_map_for_gpu_memory_buffers); 89 bool use_persistent_map_for_gpu_memory_buffers);
90 virtual ~ResourceProvider(); 90 virtual ~ResourceProvider();
91 91
92 void DidLoseOutputSurface() { lost_output_surface_ = true; } 92 void DidLoseOutputSurface() { lost_output_surface_ = true; }
93 93
94 int max_texture_size() const { return max_texture_size_; } 94 int max_texture_size() const { return max_texture_size_; }
95 ResourceFormat memory_efficient_texture_format() const { 95 ResourceFormat memory_efficient_texture_format() const {
96 return use_rgba_4444_texture_format_ ? RGBA_4444 : best_texture_format_; 96 return use_rgba_4444_texture_format_ ? RGBA_4444 : best_texture_format_;
97 } 97 }
98 ResourceFormat best_texture_format() const { return best_texture_format_; } 98 ResourceFormat best_texture_format() const { return best_texture_format_; }
99 ResourceFormat best_render_buffer_format() const {
100 return best_render_buffer_format_;
101 }
99 ResourceFormat yuv_resource_format() const { return yuv_resource_format_; } 102 ResourceFormat yuv_resource_format() const { return yuv_resource_format_; }
100 bool use_sync_query() const { return use_sync_query_; } 103 bool use_sync_query() const { return use_sync_query_; }
101 bool use_persistent_map_for_gpu_memory_buffers() const { 104 bool use_persistent_map_for_gpu_memory_buffers() const {
102 return use_persistent_map_for_gpu_memory_buffers_; 105 return use_persistent_map_for_gpu_memory_buffers_;
103 } 106 }
104 size_t num_resources() const { return resources_.size(); } 107 size_t num_resources() const { return resources_.size(); }
105 108
106 // Checks whether a resource is in use by a consumer. 109 // Checks whether a resource is in use by a consumer.
107 bool InUseByConsumer(ResourceId id); 110 bool InUseByConsumer(ResourceId id);
108 111
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 592
590 ResourceType default_resource_type_; 593 ResourceType default_resource_type_;
591 bool use_texture_storage_ext_; 594 bool use_texture_storage_ext_;
592 bool use_texture_format_bgra_; 595 bool use_texture_format_bgra_;
593 bool use_texture_usage_hint_; 596 bool use_texture_usage_hint_;
594 bool use_compressed_texture_etc1_; 597 bool use_compressed_texture_etc1_;
595 ResourceFormat yuv_resource_format_; 598 ResourceFormat yuv_resource_format_;
596 scoped_ptr<TextureUploader> texture_uploader_; 599 scoped_ptr<TextureUploader> texture_uploader_;
597 int max_texture_size_; 600 int max_texture_size_;
598 ResourceFormat best_texture_format_; 601 ResourceFormat best_texture_format_;
602 ResourceFormat best_render_buffer_format_;
599 603
600 base::ThreadChecker thread_checker_; 604 base::ThreadChecker thread_checker_;
601 605
602 scoped_refptr<Fence> current_read_lock_fence_; 606 scoped_refptr<Fence> current_read_lock_fence_;
603 bool use_rgba_4444_texture_format_; 607 bool use_rgba_4444_texture_format_;
604 608
605 const size_t id_allocation_chunk_size_; 609 const size_t id_allocation_chunk_size_;
606 scoped_ptr<IdAllocator> texture_id_allocator_; 610 scoped_ptr<IdAllocator> texture_id_allocator_;
607 scoped_ptr<IdAllocator> buffer_id_allocator_; 611 scoped_ptr<IdAllocator> buffer_id_allocator_;
608 612
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 return format_gl_data_format[format]; 669 return format_gl_data_format[format];
666 } 670 }
667 671
668 inline GLenum GLInternalFormat(ResourceFormat format) { 672 inline GLenum GLInternalFormat(ResourceFormat format) {
669 return GLDataFormat(format); 673 return GLDataFormat(format);
670 } 674 }
671 675
672 } // namespace cc 676 } // namespace cc
673 677
674 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 678 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698