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

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

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 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/raster_worker_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 <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 ResourceId CreateResourceFromTextureMailbox( 128 ResourceId CreateResourceFromTextureMailbox(
129 const TextureMailbox& mailbox, 129 const TextureMailbox& mailbox,
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 gfx::Rect image_rect, 138 const gfx::Rect& image_rect,
139 gfx::Rect source_rect, 139 const gfx::Rect& source_rect,
140 gfx::Vector2d dest_offset); 140 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
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 return format_gl_data_format[format]; 551 return format_gl_data_format[format];
552 } 552 }
553 553
554 inline GLenum GLInternalFormat(ResourceFormat format) { 554 inline GLenum GLInternalFormat(ResourceFormat format) {
555 return GLDataFormat(format); 555 return GLDataFormat(format);
556 } 556 }
557 557
558 } // namespace cc 558 } // namespace cc
559 559
560 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 560 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698