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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 359 |
360 // Enable read lock fences for a specific resource. | 360 // Enable read lock fences for a specific resource. |
361 void EnableReadLockFences(ResourceProvider::ResourceId id); | 361 void EnableReadLockFences(ResourceProvider::ResourceId id); |
362 | 362 |
363 // Indicates if we can currently lock this resource for write. | 363 // Indicates if we can currently lock this resource for write. |
364 bool CanLockForWrite(ResourceId id); | 364 bool CanLockForWrite(ResourceId id); |
365 | 365 |
366 // Copy pixels from source to destination. | 366 // Copy pixels from source to destination. |
367 void CopyResource(ResourceId source_id, ResourceId dest_id); | 367 void CopyResource(ResourceId source_id, ResourceId dest_id); |
368 | 368 |
| 369 void WaitSyncPointIfNeeded(ResourceId id); |
| 370 |
369 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); | 371 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); |
370 | 372 |
371 private: | 373 private: |
372 class GpuRasterBuffer; | 374 class GpuRasterBuffer; |
373 class ImageRasterBuffer; | 375 class ImageRasterBuffer; |
374 class PixelRasterBuffer; | 376 class PixelRasterBuffer; |
375 | 377 |
376 struct Resource { | 378 struct Resource { |
377 enum Origin { Internal, External, Delegated }; | 379 enum Origin { Internal, External, Delegated }; |
378 | 380 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 return format_gl_data_format[format]; | 698 return format_gl_data_format[format]; |
697 } | 699 } |
698 | 700 |
699 inline GLenum GLInternalFormat(ResourceFormat format) { | 701 inline GLenum GLInternalFormat(ResourceFormat format) { |
700 return GLDataFormat(format); | 702 return GLDataFormat(format); |
701 } | 703 } |
702 | 704 |
703 } // namespace cc | 705 } // namespace cc |
704 | 706 |
705 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 707 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |