| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 // Receives resources from the parent, moving them from mailboxes. Resource | 202 // Receives resources from the parent, moving them from mailboxes. Resource |
| 203 // IDs passed are in the child namespace. | 203 // IDs passed are in the child namespace. |
| 204 // NOTE: if the sync_token is set on any TransferableResource, this will | 204 // NOTE: if the sync_token is set on any TransferableResource, this will |
| 205 // wait on it. | 205 // wait on it. |
| 206 void ReceiveReturnsFromParent( | 206 void ReceiveReturnsFromParent( |
| 207 const ReturnedResourceArray& transferable_resources); | 207 const ReturnedResourceArray& transferable_resources); |
| 208 | 208 |
| 209 #if defined(OS_ANDROID) | 209 #if defined(OS_ANDROID) |
| 210 // Send an overlay promotion hint to all resources that requested it via | 210 // Send an overlay promotion hint to all resources that requested it via |
| 211 // |want_promotion_hint|. |promotable_hints| contains all the resources that | 211 // |wants_promotion_hints_set_|. |promotable_hints| contains all the |
| 212 // should be told that they're promotable. Others will be told that they're | 212 // resources that should be told that they're promotable. Others will be told |
| 213 // not promotable right now. | 213 // that they're not promotable right now. |
| 214 void SendPromotionHints(const ResourceIdSet& promotable_hints); | 214 void SendPromotionHints( |
| 215 const OverlayCandidateList::PromotionHintInfoMap& promotion_hints); |
| 215 #endif | 216 #endif |
| 216 | 217 |
| 217 // The following lock classes are part of the ResourceProvider API and are | 218 // The following lock classes are part of the ResourceProvider API and are |
| 218 // needed to read and write the resource contents. The user must ensure | 219 // needed to read and write the resource contents. The user must ensure |
| 219 // that they only use GL locks on GL resources, etc, and this is enforced | 220 // that they only use GL locks on GL resources, etc, and this is enforced |
| 220 // by assertions. | 221 // by assertions. |
| 221 class CC_EXPORT ScopedReadLockGL { | 222 class CC_EXPORT ScopedReadLockGL { |
| 222 public: | 223 public: |
| 223 ScopedReadLockGL(ResourceProvider* resource_provider, | 224 ScopedReadLockGL(ResourceProvider* resource_provider, |
| 224 ResourceId resource_id); | 225 ResourceId resource_id); |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 // Set of resource Ids that would like to be notified about promotion hints. | 749 // Set of resource Ids that would like to be notified about promotion hints. |
| 749 ResourceIdSet wants_promotion_hints_set_; | 750 ResourceIdSet wants_promotion_hints_set_; |
| 750 #endif | 751 #endif |
| 751 | 752 |
| 752 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 753 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 753 }; | 754 }; |
| 754 | 755 |
| 755 } // namespace cc | 756 } // namespace cc |
| 756 | 757 |
| 757 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 758 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |