| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 void CreateForTesting(ResourceId id); | 447 void CreateForTesting(ResourceId id); |
| 448 | 448 |
| 449 // Sets the current read fence. If a resource is locked for read | 449 // Sets the current read fence. If a resource is locked for read |
| 450 // and has read fences enabled, the resource will not allow writes | 450 // and has read fences enabled, the resource will not allow writes |
| 451 // until this fence has passed. | 451 // until this fence has passed. |
| 452 void SetReadLockFence(Fence* fence) { current_read_lock_fence_ = fence; } | 452 void SetReadLockFence(Fence* fence) { current_read_lock_fence_ = fence; } |
| 453 | 453 |
| 454 // Indicates if we can currently lock this resource for write. | 454 // Indicates if we can currently lock this resource for write. |
| 455 bool CanLockForWrite(ResourceId id); | 455 bool CanLockForWrite(ResourceId id); |
| 456 | 456 |
| 457 // Indicates if this resource is currently being used as an overlay by the | |
| 458 // windowing system. | |
| 459 // TODO(ccameron): This should be entirely hidden inside CanLockForWrite, but | |
| 460 // will erratically returns true, potentially breaking DCHECKs. | |
| 461 // http://crbug.com/577121 | |
| 462 bool IsInUseByMacOSWindowServer(ResourceId id); | |
| 463 | |
| 464 // Indicates if this resource may be used for a hardware overlay plane. | 457 // Indicates if this resource may be used for a hardware overlay plane. |
| 465 bool IsOverlayCandidate(ResourceId id); | 458 bool IsOverlayCandidate(ResourceId id); |
| 466 | 459 |
| 467 void WaitSyncTokenIfNeeded(ResourceId id); | 460 void WaitSyncTokenIfNeeded(ResourceId id); |
| 468 | 461 |
| 469 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); | 462 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); |
| 470 | 463 |
| 471 OutputSurface* output_surface() { return output_surface_; } | 464 OutputSurface* output_surface() { return output_surface_; } |
| 472 | 465 |
| 473 void ValidateResource(ResourceId id) const; | 466 void ValidateResource(ResourceId id) const; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 // A process-unique ID used for disambiguating memory dumps from different | 700 // A process-unique ID used for disambiguating memory dumps from different |
| 708 // resource providers. | 701 // resource providers. |
| 709 int tracing_id_; | 702 int tracing_id_; |
| 710 | 703 |
| 711 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 704 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 712 }; | 705 }; |
| 713 | 706 |
| 714 } // namespace cc | 707 } // namespace cc |
| 715 | 708 |
| 716 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 709 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |