| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 GLenum texture_pool, | 94 GLenum texture_pool, |
| 95 TextureUsageHint hint); | 95 TextureUsageHint hint); |
| 96 | 96 |
| 97 ResourceId CreateBitmap(gfx::Size size); | 97 ResourceId CreateBitmap(gfx::Size size); |
| 98 // Wraps an external texture into a GL resource. | 98 // Wraps an external texture into a GL resource. |
| 99 ResourceId CreateResourceFromExternalTexture(unsigned texture_id); | 99 ResourceId CreateResourceFromExternalTexture(unsigned texture_id); |
| 100 | 100 |
| 101 // Wraps an external texture mailbox into a GL resource. | 101 // Wraps an external texture mailbox into a GL resource. |
| 102 ResourceId CreateResourceFromTextureMailbox(const TextureMailbox& mailbox); | 102 ResourceId CreateResourceFromTextureMailbox(const TextureMailbox& mailbox); |
| 103 | 103 |
| 104 // Resizes an existing resource. |
| 105 void ResizeResource(ResourceId id, gfx::Size size); |
| 106 |
| 104 void DeleteResource(ResourceId id); | 107 void DeleteResource(ResourceId id); |
| 105 | 108 |
| 106 // Update pixels from image, copying source_rect (in image) to dest_offset (in | 109 // Update pixels from image, copying source_rect (in image) to dest_offset (in |
| 107 // the resource). | 110 // the resource). |
| 108 void SetPixels(ResourceId id, | 111 void SetPixels(ResourceId id, |
| 109 const uint8_t* image, | 112 const uint8_t* image, |
| 110 gfx::Rect image_rect, | 113 gfx::Rect image_rect, |
| 111 gfx::Rect source_rect, | 114 gfx::Rect source_rect, |
| 112 gfx::Vector2d dest_offset); | 115 gfx::Vector2d dest_offset); |
| 113 | 116 |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 base::ThreadChecker thread_checker_; | 394 base::ThreadChecker thread_checker_; |
| 392 | 395 |
| 393 scoped_refptr<Fence> current_read_lock_fence_; | 396 scoped_refptr<Fence> current_read_lock_fence_; |
| 394 | 397 |
| 395 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 398 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 396 }; | 399 }; |
| 397 | 400 |
| 398 } | 401 } |
| 399 | 402 |
| 400 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 403 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |