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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 Normal, | 462 Normal, |
463 ForShutdown, | 463 ForShutdown, |
464 }; | 464 }; |
465 void DeleteResourceInternal(ResourceMap::iterator it, DeleteStyle style); | 465 void DeleteResourceInternal(ResourceMap::iterator it, DeleteStyle style); |
466 void DeleteAndReturnUnusedResourcesToChild(ChildMap::iterator child_it, | 466 void DeleteAndReturnUnusedResourcesToChild(ChildMap::iterator child_it, |
467 DeleteStyle style, | 467 DeleteStyle style, |
468 const ResourceIdArray& unused); | 468 const ResourceIdArray& unused); |
469 void DestroyChildInternal(ChildMap::iterator it, DeleteStyle style); | 469 void DestroyChildInternal(ChildMap::iterator it, DeleteStyle style); |
470 void LazyCreate(Resource* resource); | 470 void LazyCreate(Resource* resource); |
471 void LazyAllocate(Resource* resource); | 471 void LazyAllocate(Resource* resource); |
| 472 void BindImageForSampling(Resource* resource); |
472 | 473 |
473 // Binds the given GL resource to a texture target for sampling using the | 474 // Binds the given GL resource to a texture target for sampling using the |
474 // specified filter for both minification and magnification. Returns the | 475 // specified filter for both minification and magnification. Returns the |
475 // texture target used. The resource must be locked for reading. | 476 // texture target used. The resource must be locked for reading. |
476 GLenum BindForSampling(ResourceProvider::ResourceId resource_id, | 477 GLenum BindForSampling(ResourceProvider::ResourceId resource_id, |
477 GLenum unit, | 478 GLenum unit, |
478 GLenum filter); | 479 GLenum filter); |
479 | 480 |
480 // Returns NULL if the output_surface_ does not have a ContextProvider. | 481 // Returns NULL if the output_surface_ does not have a ContextProvider. |
481 gpu::gles2::GLES2Interface* ContextGL() const; | 482 gpu::gles2::GLES2Interface* ContextGL() const; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 return format_gl_data_format[format]; | 552 return format_gl_data_format[format]; |
552 } | 553 } |
553 | 554 |
554 inline GLenum GLInternalFormat(ResourceFormat format) { | 555 inline GLenum GLInternalFormat(ResourceFormat format) { |
555 return GLDataFormat(format); | 556 return GLDataFormat(format); |
556 } | 557 } |
557 | 558 |
558 } // namespace cc | 559 } // namespace cc |
559 | 560 |
560 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 561 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |