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

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

Issue 132163009: [#6]Pass gfx structs by const ref (gfx::Vector2d) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on TOT Created 6 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/resources/prioritized_resource.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 <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 scoped_ptr<SingleReleaseCallback> release_callback); 130 scoped_ptr<SingleReleaseCallback> release_callback);
131 131
132 void DeleteResource(ResourceId id); 132 void DeleteResource(ResourceId id);
133 133
134 // Update pixels from image, copying source_rect (in image) to dest_offset (in 134 // Update pixels from image, copying source_rect (in image) to dest_offset (in
135 // the resource). 135 // the resource).
136 void SetPixels(ResourceId id, 136 void SetPixels(ResourceId id,
137 const uint8_t* image, 137 const uint8_t* image,
138 const gfx::Rect& image_rect, 138 const gfx::Rect& image_rect,
139 const gfx::Rect& source_rect, 139 const gfx::Rect& source_rect,
140 gfx::Vector2d dest_offset); 140 const gfx::Vector2d& dest_offset);
141 141
142 // Check upload status. 142 // Check upload status.
143 size_t NumBlockingUploads(); 143 size_t NumBlockingUploads();
144 void MarkPendingUploadsAsNonBlocking(); 144 void MarkPendingUploadsAsNonBlocking();
145 size_t EstimatedUploadsPerTick(); 145 size_t EstimatedUploadsPerTick();
146 void FlushUploads(); 146 void FlushUploads();
147 void ReleaseCachedData(); 147 void ReleaseCachedData();
148 base::TimeTicks EstimatedUploadCompletionTime(size_t uploads_per_tick); 148 base::TimeTicks EstimatedUploadCompletionTime(size_t uploads_per_tick);
149 149
150 // Flush all context operations, kicking uploads and ensuring ordering with 150 // Flush all context operations, kicking uploads and ensuring ordering with
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 return format_gl_data_format[format]; 557 return format_gl_data_format[format];
558 } 558 }
559 559
560 inline GLenum GLInternalFormat(ResourceFormat format) { 560 inline GLenum GLInternalFormat(ResourceFormat format) {
561 return GLDataFormat(format); 561 return GLDataFormat(format);
562 } 562 }
563 563
564 } // namespace cc 564 } // namespace cc
565 565
566 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 566 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/resources/prioritized_resource.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698