| OLD | NEW |
| 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 Loading... |
| 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 |
| 80 }; | 81 }; |
| 81 enum ResourceType { | 82 enum ResourceType { |
| 82 RESOURCE_TYPE_GPU_MEMORY_BUFFER, | 83 RESOURCE_TYPE_GPU_MEMORY_BUFFER, |
| 83 RESOURCE_TYPE_GL_TEXTURE, | 84 RESOURCE_TYPE_GL_TEXTURE, |
| 84 RESOURCE_TYPE_BITMAP, | 85 RESOURCE_TYPE_BITMAP, |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 ResourceProvider(viz::ContextProvider* compositor_context_provider, | 88 ResourceProvider(viz::ContextProvider* compositor_context_provider, |
| 88 viz::SharedBitmapManager* shared_bitmap_manager, | 89 viz::SharedBitmapManager* shared_bitmap_manager, |
| 89 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 90 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 Settings(viz::ContextProvider* compositor_context_provider, | 774 Settings(viz::ContextProvider* compositor_context_provider, |
| 774 bool delegated_sync_points_needed, | 775 bool delegated_sync_points_needed, |
| 775 bool enable_color_correct_rasterization, | 776 bool enable_color_correct_rasterization, |
| 776 const viz::ResourceSettings& resource_settings); | 777 const viz::ResourceSettings& resource_settings); |
| 777 | 778 |
| 778 int max_texture_size = 0; | 779 int max_texture_size = 0; |
| 779 bool use_texture_storage_ext = false; | 780 bool use_texture_storage_ext = false; |
| 780 bool use_texture_format_bgra = false; | 781 bool use_texture_format_bgra = false; |
| 781 bool use_texture_usage_hint = false; | 782 bool use_texture_usage_hint = false; |
| 782 bool use_sync_query = false; | 783 bool use_sync_query = false; |
| 784 bool use_texture_buffer_chromium = false; |
| 783 ResourceType default_resource_type = RESOURCE_TYPE_GL_TEXTURE; | 785 ResourceType default_resource_type = RESOURCE_TYPE_GL_TEXTURE; |
| 784 viz::ResourceFormat yuv_resource_format = viz::LUMINANCE_8; | 786 viz::ResourceFormat yuv_resource_format = viz::LUMINANCE_8; |
| 785 viz::ResourceFormat yuv_highbit_resource_format = viz::LUMINANCE_8; | 787 viz::ResourceFormat yuv_highbit_resource_format = viz::LUMINANCE_8; |
| 786 viz::ResourceFormat best_texture_format = viz::RGBA_8888; | 788 viz::ResourceFormat best_texture_format = viz::RGBA_8888; |
| 787 viz::ResourceFormat best_render_buffer_format = viz::RGBA_8888; | 789 viz::ResourceFormat best_render_buffer_format = viz::RGBA_8888; |
| 788 bool enable_color_correct_rasterization = false; | 790 bool enable_color_correct_rasterization = false; |
| 789 bool delegated_sync_points_required = false; | 791 bool delegated_sync_points_required = false; |
| 790 } const settings_; | 792 } const settings_; |
| 791 | 793 |
| 792 viz::ContextProvider* compositor_context_provider_; | 794 viz::ContextProvider* compositor_context_provider_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 818 // Set of resource Ids that would like to be notified about promotion hints. | 820 // Set of resource Ids that would like to be notified about promotion hints. |
| 819 viz::ResourceIdSet wants_promotion_hints_set_; | 821 viz::ResourceIdSet wants_promotion_hints_set_; |
| 820 #endif | 822 #endif |
| 821 | 823 |
| 822 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 824 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 823 }; | 825 }; |
| 824 | 826 |
| 825 } // namespace cc | 827 } // namespace cc |
| 826 | 828 |
| 827 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 829 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |