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