| 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 <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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |