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

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

Issue 759753005: cc: Enable GL_RED_EXT for YUV resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext_texture_rg2
Patch Set: Restore correct name Created 6 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
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void InitializeSoftware(); 92 void InitializeSoftware();
93 void InitializeGL(); 93 void InitializeGL();
94 94
95 void DidLoseOutputSurface() { lost_output_surface_ = true; } 95 void DidLoseOutputSurface() { lost_output_surface_ = true; }
96 96
97 int max_texture_size() const { return max_texture_size_; } 97 int max_texture_size() const { return max_texture_size_; }
98 ResourceFormat memory_efficient_texture_format() const { 98 ResourceFormat memory_efficient_texture_format() const {
99 return use_rgba_4444_texture_format_ ? RGBA_4444 : best_texture_format_; 99 return use_rgba_4444_texture_format_ ? RGBA_4444 : best_texture_format_;
100 } 100 }
101 ResourceFormat best_texture_format() const { return best_texture_format_; } 101 ResourceFormat best_texture_format() const { return best_texture_format_; }
102 ResourceFormat yuv_resource_format() const { return yuv_resource_format_; }
102 bool use_sync_query() const { return use_sync_query_; } 103 bool use_sync_query() const { return use_sync_query_; }
103 size_t num_resources() const { return resources_.size(); } 104 size_t num_resources() const { return resources_.size(); }
104 105
105 // Checks whether a resource is in use by a consumer. 106 // Checks whether a resource is in use by a consumer.
106 bool InUseByConsumer(ResourceId id); 107 bool InUseByConsumer(ResourceId id);
107 108
108 bool IsLost(ResourceId id); 109 bool IsLost(ResourceId id);
109 bool AllowOverlay(ResourceId id); 110 bool AllowOverlay(ResourceId id);
110 111
111 // Producer interface. 112 // Producer interface.
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 ResourceId next_id_; 572 ResourceId next_id_;
572 ResourceMap resources_; 573 ResourceMap resources_;
573 int next_child_; 574 int next_child_;
574 ChildMap children_; 575 ChildMap children_;
575 576
576 ResourceType default_resource_type_; 577 ResourceType default_resource_type_;
577 bool use_texture_storage_ext_; 578 bool use_texture_storage_ext_;
578 bool use_texture_format_bgra_; 579 bool use_texture_format_bgra_;
579 bool use_texture_usage_hint_; 580 bool use_texture_usage_hint_;
580 bool use_compressed_texture_etc1_; 581 bool use_compressed_texture_etc1_;
582 ResourceFormat yuv_resource_format_;
581 scoped_ptr<TextureUploader> texture_uploader_; 583 scoped_ptr<TextureUploader> texture_uploader_;
582 int max_texture_size_; 584 int max_texture_size_;
583 ResourceFormat best_texture_format_; 585 ResourceFormat best_texture_format_;
584 586
585 base::ThreadChecker thread_checker_; 587 base::ThreadChecker thread_checker_;
586 588
587 scoped_refptr<Fence> current_read_lock_fence_; 589 scoped_refptr<Fence> current_read_lock_fence_;
588 bool use_rgba_4444_texture_format_; 590 bool use_rgba_4444_texture_format_;
589 591
590 const size_t id_allocation_chunk_size_; 592 const size_t id_allocation_chunk_size_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 return format_gl_data_format[format]; 651 return format_gl_data_format[format];
650 } 652 }
651 653
652 inline GLenum GLInternalFormat(ResourceFormat format) { 654 inline GLenum GLInternalFormat(ResourceFormat format) {
653 return GLDataFormat(format); 655 return GLDataFormat(format);
654 } 656 }
655 657
656 } // namespace cc 658 } // namespace cc
657 659
658 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 660 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698