Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: cc/resources/resource_provider.h

Issue 2607033002: Flush after ResourcePool deletions complete (Closed)
Patch Set: fix |resource_provider_| check Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/resource_pool.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 ResourceId CreateResourceFromTextureMailbox( 143 ResourceId CreateResourceFromTextureMailbox(
144 const TextureMailbox& mailbox, 144 const TextureMailbox& mailbox,
145 std::unique_ptr<SingleReleaseCallbackImpl> release_callback_impl); 145 std::unique_ptr<SingleReleaseCallbackImpl> release_callback_impl);
146 146
147 ResourceId CreateResourceFromTextureMailbox( 147 ResourceId CreateResourceFromTextureMailbox(
148 const TextureMailbox& mailbox, 148 const TextureMailbox& mailbox,
149 std::unique_ptr<SingleReleaseCallbackImpl> release_callback_impl, 149 std::unique_ptr<SingleReleaseCallbackImpl> release_callback_impl,
150 bool read_lock_fences_enabled); 150 bool read_lock_fences_enabled);
151 151
152 void DeleteResource(ResourceId id); 152 void DeleteResource(ResourceId id);
153 // In the case of GPU resources, we may need to flush the GL context to ensure
154 // that texture deletions are seen in a timely fashion. This function should
155 // be called after texture deletions that may happen during an idle state.
156 void FlushPendingDeletions() const;
153 157
154 // 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
155 // the resource). 159 // the resource).
156 void CopyToResource(ResourceId id, 160 void CopyToResource(ResourceId id,
157 const uint8_t* image, 161 const uint8_t* image,
158 const gfx::Size& image_size); 162 const gfx::Size& image_size);
159 163
160 // Generates sync tokesn for resources which need a sync token. 164 // Generates sync tokesn for resources which need a sync token.
161 void GenerateSyncTokenForResource(ResourceId resource_id); 165 void GenerateSyncTokenForResource(ResourceId resource_id);
162 void GenerateSyncTokenForResources(const ResourceIdArray& resource_ids); 166 void GenerateSyncTokenForResources(const ResourceIdArray& resource_ids);
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 // Set of resource Ids that would like to be notified about promotion hints. 753 // Set of resource Ids that would like to be notified about promotion hints.
750 ResourceIdSet wants_promotion_hints_set_; 754 ResourceIdSet wants_promotion_hints_set_;
751 #endif 755 #endif
752 756
753 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); 757 DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
754 }; 758 };
755 759
756 } // namespace cc 760 } // namespace cc
757 761
758 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 762 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/resources/resource_pool.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698