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

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

Issue 2999923002: Revert of Allow creating GLImage-backed textures with glTexStorage2D. (Closed)
Patch Set: rebase Created 3 years, 4 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
« 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 struct Resource; 69 struct Resource;
70 70
71 public: 71 public:
72 using ResourceIdArray = std::vector<viz::ResourceId>; 72 using ResourceIdArray = std::vector<viz::ResourceId>;
73 using ResourceIdMap = std::unordered_map<viz::ResourceId, viz::ResourceId>; 73 using ResourceIdMap = std::unordered_map<viz::ResourceId, viz::ResourceId>;
74 enum TextureHint { 74 enum TextureHint {
75 TEXTURE_HINT_DEFAULT = 0x0, 75 TEXTURE_HINT_DEFAULT = 0x0,
76 TEXTURE_HINT_IMMUTABLE = 0x1, 76 TEXTURE_HINT_IMMUTABLE = 0x1,
77 TEXTURE_HINT_FRAMEBUFFER = 0x2, 77 TEXTURE_HINT_FRAMEBUFFER = 0x2,
78 TEXTURE_HINT_IMMUTABLE_FRAMEBUFFER = 78 TEXTURE_HINT_IMMUTABLE_FRAMEBUFFER =
79 TEXTURE_HINT_IMMUTABLE | TEXTURE_HINT_FRAMEBUFFER, 79 TEXTURE_HINT_IMMUTABLE | TEXTURE_HINT_FRAMEBUFFER
80 TEXTURE_HINT_IMAGE = 0x4
81 }; 80 };
82 enum ResourceType { 81 enum ResourceType {
83 RESOURCE_TYPE_GPU_MEMORY_BUFFER, 82 RESOURCE_TYPE_GPU_MEMORY_BUFFER,
84 RESOURCE_TYPE_GL_TEXTURE, 83 RESOURCE_TYPE_GL_TEXTURE,
85 RESOURCE_TYPE_BITMAP, 84 RESOURCE_TYPE_BITMAP,
86 }; 85 };
87 86
88 ResourceProvider(viz::ContextProvider* compositor_context_provider, 87 ResourceProvider(viz::ContextProvider* compositor_context_provider,
89 viz::SharedBitmapManager* shared_bitmap_manager, 88 viz::SharedBitmapManager* shared_bitmap_manager,
90 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 89 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 Settings(viz::ContextProvider* compositor_context_provider, 773 Settings(viz::ContextProvider* compositor_context_provider,
775 bool delegated_sync_points_needed, 774 bool delegated_sync_points_needed,
776 bool enable_color_correct_rasterization, 775 bool enable_color_correct_rasterization,
777 const viz::ResourceSettings& resource_settings); 776 const viz::ResourceSettings& resource_settings);
778 777
779 int max_texture_size = 0; 778 int max_texture_size = 0;
780 bool use_texture_storage_ext = false; 779 bool use_texture_storage_ext = false;
781 bool use_texture_format_bgra = false; 780 bool use_texture_format_bgra = false;
782 bool use_texture_usage_hint = false; 781 bool use_texture_usage_hint = false;
783 bool use_sync_query = false; 782 bool use_sync_query = false;
784 bool use_texture_buffer_chromium = false;
785 ResourceType default_resource_type = RESOURCE_TYPE_GL_TEXTURE; 783 ResourceType default_resource_type = RESOURCE_TYPE_GL_TEXTURE;
786 viz::ResourceFormat yuv_resource_format = viz::LUMINANCE_8; 784 viz::ResourceFormat yuv_resource_format = viz::LUMINANCE_8;
787 viz::ResourceFormat yuv_highbit_resource_format = viz::LUMINANCE_8; 785 viz::ResourceFormat yuv_highbit_resource_format = viz::LUMINANCE_8;
788 viz::ResourceFormat best_texture_format = viz::RGBA_8888; 786 viz::ResourceFormat best_texture_format = viz::RGBA_8888;
789 viz::ResourceFormat best_render_buffer_format = viz::RGBA_8888; 787 viz::ResourceFormat best_render_buffer_format = viz::RGBA_8888;
790 bool enable_color_correct_rasterization = false; 788 bool enable_color_correct_rasterization = false;
791 bool delegated_sync_points_required = false; 789 bool delegated_sync_points_required = false;
792 } const settings_; 790 } const settings_;
793 791
794 viz::ContextProvider* compositor_context_provider_; 792 viz::ContextProvider* compositor_context_provider_;
(...skipping 25 matching lines...) Expand all
820 // Set of resource Ids that would like to be notified about promotion hints. 818 // Set of resource Ids that would like to be notified about promotion hints.
821 viz::ResourceIdSet wants_promotion_hints_set_; 819 viz::ResourceIdSet wants_promotion_hints_set_;
822 #endif 820 #endif
823 821
824 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); 822 DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
825 }; 823 };
826 824
827 } // namespace cc 825 } // namespace cc
828 826
829 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 827 #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