| 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 <deque> | 8 #include <deque> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 bool use_sync_query() const { return use_sync_query_; } | 100 bool use_sync_query() const { return use_sync_query_; } |
| 101 bool use_persistent_map_for_gpu_memory_buffers() const { | 101 bool use_persistent_map_for_gpu_memory_buffers() const { |
| 102 return use_persistent_map_for_gpu_memory_buffers_; | 102 return use_persistent_map_for_gpu_memory_buffers_; |
| 103 } | 103 } |
| 104 size_t num_resources() const { return resources_.size(); } | 104 size_t num_resources() const { return resources_.size(); } |
| 105 | 105 |
| 106 // Checks whether a resource is in use by a consumer. | 106 // Checks whether a resource is in use by a consumer. |
| 107 bool InUseByConsumer(ResourceId id); | 107 bool InUseByConsumer(ResourceId id); |
| 108 | 108 |
| 109 bool IsLost(ResourceId id); | 109 bool IsLost(ResourceId id); |
| 110 bool AllowOverlay(ResourceId id); | |
| 111 | 110 |
| 112 // Producer interface. | 111 // Producer interface. |
| 113 | 112 |
| 114 ResourceType default_resource_type() const { return default_resource_type_; } | 113 ResourceType default_resource_type() const { return default_resource_type_; } |
| 115 ResourceType GetResourceType(ResourceId id); | 114 ResourceType GetResourceType(ResourceId id); |
| 116 | 115 |
| 117 // Creates a resource of the default resource type. | 116 // Creates a resource of the default resource type. |
| 118 ResourceId CreateResource(const gfx::Size& size, | 117 ResourceId CreateResource(const gfx::Size& size, |
| 119 GLint wrap_mode, | 118 GLint wrap_mode, |
| 120 TextureHint hint, | 119 TextureHint hint, |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 int exported_count; | 495 int exported_count; |
| 497 bool dirty_image : 1; | 496 bool dirty_image : 1; |
| 498 bool locked_for_write : 1; | 497 bool locked_for_write : 1; |
| 499 bool lost : 1; | 498 bool lost : 1; |
| 500 bool marked_for_deletion : 1; | 499 bool marked_for_deletion : 1; |
| 501 bool pending_set_pixels : 1; | 500 bool pending_set_pixels : 1; |
| 502 bool set_pixels_completion_forced : 1; | 501 bool set_pixels_completion_forced : 1; |
| 503 bool allocated : 1; | 502 bool allocated : 1; |
| 504 bool read_lock_fences_enabled : 1; | 503 bool read_lock_fences_enabled : 1; |
| 505 bool has_shared_bitmap_id : 1; | 504 bool has_shared_bitmap_id : 1; |
| 506 bool allow_overlay : 1; | |
| 507 scoped_refptr<Fence> read_lock_fence; | 505 scoped_refptr<Fence> read_lock_fence; |
| 508 gfx::Size size; | 506 gfx::Size size; |
| 509 Origin origin; | 507 Origin origin; |
| 510 GLenum target; | 508 GLenum target; |
| 511 // TODO(skyostil): Use a separate sampler object for filter state. | 509 // TODO(skyostil): Use a separate sampler object for filter state. |
| 512 GLenum original_filter; | 510 GLenum original_filter; |
| 513 GLenum filter; | 511 GLenum filter; |
| 514 unsigned image_id; | 512 unsigned image_id; |
| 515 unsigned bound_image_id; | 513 unsigned bound_image_id; |
| 516 GLenum texture_pool; | 514 GLenum texture_pool; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 return format_gl_data_format[format]; | 663 return format_gl_data_format[format]; |
| 666 } | 664 } |
| 667 | 665 |
| 668 inline GLenum GLInternalFormat(ResourceFormat format) { | 666 inline GLenum GLInternalFormat(ResourceFormat format) { |
| 669 return GLDataFormat(format); | 667 return GLDataFormat(format); |
| 670 } | 668 } |
| 671 | 669 |
| 672 } // namespace cc | 670 } // namespace cc |
| 673 | 671 |
| 674 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 672 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |