| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // Update pixels from image, copying source_rect (in image) to dest_offset (in | 155 // Update pixels from image, copying source_rect (in image) to dest_offset (in |
| 156 // the resource). | 156 // the resource). |
| 157 void CopyToResource(ResourceId id, | 157 void CopyToResource(ResourceId id, |
| 158 const uint8_t* image, | 158 const uint8_t* image, |
| 159 const gfx::Size& image_size); | 159 const gfx::Size& image_size); |
| 160 | 160 |
| 161 // Generates sync tokesn for resources which need a sync token. | 161 // Generates sync tokesn for resources which need a sync token. |
| 162 void GenerateSyncTokenForResource(ResourceId resource_id); | 162 void GenerateSyncTokenForResource(ResourceId resource_id); |
| 163 void GenerateSyncTokenForResources(const ResourceIdArray& resource_ids); | 163 void GenerateSyncTokenForResources(const ResourceIdArray& resource_ids); |
| 164 | 164 |
| 165 // Gets the sync token for the indicated resource. |
| 166 gpu::SyncToken GetSyncTokenForResource(ResourceId resource_id); |
| 167 |
| 168 // Gets the most recent sync token from the indicated resources. |
| 169 gpu::SyncToken GetSyncTokenForResources(const ResourceIdArray& resource_ids); |
| 170 |
| 165 // Creates accounting for a child. Returns a child ID. | 171 // Creates accounting for a child. Returns a child ID. |
| 166 int CreateChild(const ReturnCallback& return_callback); | 172 int CreateChild(const ReturnCallback& return_callback); |
| 167 | 173 |
| 168 // Destroys accounting for the child, deleting all accounted resources. | 174 // Destroys accounting for the child, deleting all accounted resources. |
| 169 void DestroyChild(int child); | 175 void DestroyChild(int child); |
| 170 | 176 |
| 171 // 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 |
| 172 // child. Defaults to true. | 178 // child. Defaults to true. |
| 173 void SetChildNeedsSyncTokens(int child, bool needs_sync_tokens); | 179 void SetChildNeedsSyncTokens(int child, bool needs_sync_tokens); |
| 174 | 180 |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 // A process-unique ID used for disambiguating memory dumps from different | 717 // A process-unique ID used for disambiguating memory dumps from different |
| 712 // resource providers. | 718 // resource providers. |
| 713 int tracing_id_; | 719 int tracing_id_; |
| 714 | 720 |
| 715 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 721 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 716 }; | 722 }; |
| 717 | 723 |
| 718 } // namespace cc | 724 } // namespace cc |
| 719 | 725 |
| 720 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 726 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |