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

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

Issue 1707143002: Added methods to generate sync tokens for resource id(s). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added reserve Created 4 years, 10 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/layers/video_layer_impl.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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 bool read_lock_fences_enabled); 152 bool read_lock_fences_enabled);
153 153
154 void DeleteResource(ResourceId id); 154 void DeleteResource(ResourceId id);
155 155
156 // Update pixels from image, copying source_rect (in image) to dest_offset (in 156 // Update pixels from image, copying source_rect (in image) to dest_offset (in
157 // the resource). 157 // the resource).
158 void CopyToResource(ResourceId id, 158 void CopyToResource(ResourceId id,
159 const uint8_t* image, 159 const uint8_t* image,
160 const gfx::Size& image_size); 160 const gfx::Size& image_size);
161 161
162 // Only flush the command buffer if supported. 162 // Generates sync tokesn for resources which need a sync token.
163 // Returns true if the shallow flush occurred, false otherwise. 163 void GenerateSyncTokenForResource(ResourceId resource_id);
164 bool ShallowFlushIfSupported(); 164 void GenerateSyncTokenForResources(const ResourceIdArray& resource_ids);
165 165
166 // Creates accounting for a child. Returns a child ID. 166 // Creates accounting for a child. Returns a child ID.
167 int CreateChild(const ReturnCallback& return_callback); 167 int CreateChild(const ReturnCallback& return_callback);
168 168
169 // Destroys accounting for the child, deleting all accounted resources. 169 // Destroys accounting for the child, deleting all accounted resources.
170 void DestroyChild(int child); 170 void DestroyChild(int child);
171 171
172 // Sets whether resources need sync points set on them when returned to this 172 // Sets whether resources need sync points set on them when returned to this
173 // child. Defaults to true. 173 // child. Defaults to true.
174 void SetChildNeedsSyncTokens(int child, bool needs_sync_tokens); 174 void SetChildNeedsSyncTokens(int child, bool needs_sync_tokens);
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 // A process-unique ID used for disambiguating memory dumps from different 674 // A process-unique ID used for disambiguating memory dumps from different
675 // resource providers. 675 // resource providers.
676 int tracing_id_; 676 int tracing_id_;
677 677
678 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); 678 DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
679 }; 679 };
680 680
681 } // namespace cc 681 } // namespace cc
682 682
683 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 683 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698