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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 ResourceId CreateBitmap(const gfx::Size& size, GLint wrap_mode); | 138 ResourceId CreateBitmap(const gfx::Size& size, GLint wrap_mode); |
139 // Wraps an IOSurface into a GL resource. | 139 // Wraps an IOSurface into a GL resource. |
140 ResourceId CreateResourceFromIOSurface(const gfx::Size& size, | 140 ResourceId CreateResourceFromIOSurface(const gfx::Size& size, |
141 unsigned io_surface_id); | 141 unsigned io_surface_id); |
142 | 142 |
143 // Wraps an external texture mailbox into a GL resource. | 143 // Wraps an external texture mailbox into a GL resource. |
144 ResourceId CreateResourceFromTextureMailbox( | 144 ResourceId CreateResourceFromTextureMailbox( |
145 const TextureMailbox& mailbox, | 145 const TextureMailbox& mailbox, |
146 scoped_ptr<SingleReleaseCallbackImpl> release_callback_impl); | 146 scoped_ptr<SingleReleaseCallbackImpl> release_callback_impl); |
147 | 147 |
| 148 ResourceId CreateResourceFromTextureMailbox( |
| 149 const TextureMailbox& mailbox, |
| 150 scoped_ptr<SingleReleaseCallbackImpl> release_callback_impl, |
| 151 bool read_lock_fences_enabled); |
| 152 |
148 void DeleteResource(ResourceId id); | 153 void DeleteResource(ResourceId id); |
149 | 154 |
150 // Update pixels from image, copying source_rect (in image) to dest_offset (in | 155 // Update pixels from image, copying source_rect (in image) to dest_offset (in |
151 // the resource). | 156 // the resource). |
152 // NOTE: DEPRECATED. Use CopyToResource() instead. | 157 // NOTE: DEPRECATED. Use CopyToResource() instead. |
153 void SetPixels(ResourceId id, | 158 void SetPixels(ResourceId id, |
154 const uint8_t* image, | 159 const uint8_t* image, |
155 const gfx::Rect& image_rect, | 160 const gfx::Rect& image_rect, |
156 const gfx::Rect& source_rect, | 161 const gfx::Rect& source_rect, |
157 const gfx::Vector2d& dest_offset); | 162 const gfx::Vector2d& dest_offset); |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 return format_gl_data_format[format]; | 668 return format_gl_data_format[format]; |
664 } | 669 } |
665 | 670 |
666 inline GLenum GLInternalFormat(ResourceFormat format) { | 671 inline GLenum GLInternalFormat(ResourceFormat format) { |
667 return GLDataFormat(format); | 672 return GLDataFormat(format); |
668 } | 673 } |
669 | 674 |
670 } // namespace cc | 675 } // namespace cc |
671 | 676 |
672 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 677 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |