| 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 void CopyResource(ResourceId source_id, ResourceId dest_id); | 427 void CopyResource(ResourceId source_id, ResourceId dest_id); |
| 428 | 428 |
| 429 void WaitSyncPointIfNeeded(ResourceId id); | 429 void WaitSyncPointIfNeeded(ResourceId id); |
| 430 | 430 |
| 431 void WaitReadLockIfNeeded(ResourceId id); | 431 void WaitReadLockIfNeeded(ResourceId id); |
| 432 | 432 |
| 433 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); | 433 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); |
| 434 | 434 |
| 435 OutputSurface* output_surface() { return output_surface_; } | 435 OutputSurface* output_surface() { return output_surface_; } |
| 436 | 436 |
| 437 void ValidateResource(ResourceId id); | 437 void ValidateResource(ResourceId id) const; |
| 438 | 438 |
| 439 private: | 439 private: |
| 440 struct Resource { | 440 struct Resource { |
| 441 enum Origin { INTERNAL, EXTERNAL, DELEGATED }; | 441 enum Origin { INTERNAL, EXTERNAL, DELEGATED }; |
| 442 | 442 |
| 443 ~Resource(); | 443 ~Resource(); |
| 444 Resource(unsigned texture_id, | 444 Resource(unsigned texture_id, |
| 445 const gfx::Size& size, | 445 const gfx::Size& size, |
| 446 Origin origin, | 446 Origin origin, |
| 447 GLenum target, | 447 GLenum target, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 return format_gl_data_format[format]; | 658 return format_gl_data_format[format]; |
| 659 } | 659 } |
| 660 | 660 |
| 661 inline GLenum GLInternalFormat(ResourceFormat format) { | 661 inline GLenum GLInternalFormat(ResourceFormat format) { |
| 662 return GLDataFormat(format); | 662 return GLDataFormat(format); |
| 663 } | 663 } |
| 664 | 664 |
| 665 } // namespace cc | 665 } // namespace cc |
| 666 | 666 |
| 667 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 667 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |