| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |