| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 bool IsLost(ResourceId id); | 123 bool IsLost(ResourceId id); |
| 124 | 124 |
| 125 void LoseResourceForTesting(ResourceId id); | 125 void LoseResourceForTesting(ResourceId id); |
| 126 void EnableReadLockFencesForTesting(ResourceId id); | 126 void EnableReadLockFencesForTesting(ResourceId id); |
| 127 | 127 |
| 128 // Producer interface. | 128 // Producer interface. |
| 129 | 129 |
| 130 ResourceType default_resource_type() const { return default_resource_type_; } | 130 ResourceType default_resource_type() const { return default_resource_type_; } |
| 131 ResourceType GetResourceType(ResourceId id); | 131 ResourceType GetResourceType(ResourceId id); |
| 132 GLenum GetResourceTextureTarget(ResourceId id); | 132 GLenum GetResourceTextureTarget(ResourceId id); |
| 133 bool IsImmutable(ResourceId id); |
| 133 TextureHint GetTextureHint(ResourceId id); | 134 TextureHint GetTextureHint(ResourceId id); |
| 134 | 135 |
| 135 // Creates a resource of the default resource type. | 136 // Creates a resource of the default resource type. |
| 136 ResourceId CreateResource(const gfx::Size& size, | 137 ResourceId CreateResource(const gfx::Size& size, |
| 137 TextureHint hint, | 138 TextureHint hint, |
| 138 ResourceFormat format, | 139 ResourceFormat format, |
| 139 const gfx::ColorSpace& color_space); | 140 const gfx::ColorSpace& color_space); |
| 140 | 141 |
| 141 // Creates a resource for a particular texture target (the distinction between | 142 // Creates a resource for a particular texture target (the distinction between |
| 142 // texture targets has no effect in software mode). | 143 // texture targets has no effect in software mode). |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 // A process-unique ID used for disambiguating memory dumps from different | 706 // A process-unique ID used for disambiguating memory dumps from different |
| 706 // resource providers. | 707 // resource providers. |
| 707 int tracing_id_; | 708 int tracing_id_; |
| 708 | 709 |
| 709 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 710 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 710 }; | 711 }; |
| 711 | 712 |
| 712 } // namespace cc | 713 } // namespace cc |
| 713 | 714 |
| 714 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 715 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |