| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // Update pixels from image, copying source_rect (in image) to dest_offset (in | 154 // Update pixels from image, copying source_rect (in image) to dest_offset (in |
| 155 // the resource). | 155 // the resource). |
| 156 void CopyToResource(ResourceId id, | 156 void CopyToResource(ResourceId id, |
| 157 const uint8_t* image, | 157 const uint8_t* image, |
| 158 const gfx::Size& image_size); | 158 const gfx::Size& image_size); |
| 159 | 159 |
| 160 // Generates sync tokesn for resources which need a sync token. | 160 // Generates sync tokesn for resources which need a sync token. |
| 161 void GenerateSyncTokenForResource(ResourceId resource_id); | 161 void GenerateSyncTokenForResource(ResourceId resource_id); |
| 162 void GenerateSyncTokenForResources(const ResourceIdArray& resource_ids); | 162 void GenerateSyncTokenForResources(const ResourceIdArray& resource_ids); |
| 163 | 163 |
| 164 // Gets the sync token for the indicated resource. |
| 165 gpu::SyncToken GetSyncTokenForResource(ResourceId resource_id); |
| 166 |
| 167 // Gets the most recent sync token from the indicated resources. |
| 168 gpu::SyncToken GetSyncTokenForResources(const ResourceIdArray& resource_ids); |
| 169 |
| 164 // Creates accounting for a child. Returns a child ID. | 170 // Creates accounting for a child. Returns a child ID. |
| 165 int CreateChild(const ReturnCallback& return_callback); | 171 int CreateChild(const ReturnCallback& return_callback); |
| 166 | 172 |
| 167 // Destroys accounting for the child, deleting all accounted resources. | 173 // Destroys accounting for the child, deleting all accounted resources. |
| 168 void DestroyChild(int child); | 174 void DestroyChild(int child); |
| 169 | 175 |
| 170 // Sets whether resources need sync points set on them when returned to this | 176 // Sets whether resources need sync points set on them when returned to this |
| 171 // child. Defaults to true. | 177 // child. Defaults to true. |
| 172 void SetChildNeedsSyncTokens(int child, bool needs_sync_tokens); | 178 void SetChildNeedsSyncTokens(int child, bool needs_sync_tokens); |
| 173 | 179 |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 // Set of resource Ids that would like to be notified about promotion hints. | 755 // Set of resource Ids that would like to be notified about promotion hints. |
| 750 ResourceIdSet wants_promotion_hints_set_; | 756 ResourceIdSet wants_promotion_hints_set_; |
| 751 #endif | 757 #endif |
| 752 | 758 |
| 753 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 759 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 754 }; | 760 }; |
| 755 | 761 |
| 756 } // namespace cc | 762 } // namespace cc |
| 757 | 763 |
| 758 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 764 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |