| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 int GetImageStride(ResourceId id); | 320 int GetImageStride(ResourceId id); |
| 321 | 321 |
| 322 // For tests only! This prevents detecting uninitialized reads. | 322 // For tests only! This prevents detecting uninitialized reads. |
| 323 // Use SetPixels or LockForWrite to allocate implicitly. | 323 // Use SetPixels or LockForWrite to allocate implicitly. |
| 324 void AllocateForTesting(ResourceId id); | 324 void AllocateForTesting(ResourceId id); |
| 325 | 325 |
| 326 // For tests only! | 326 // For tests only! |
| 327 void CreateForTesting(ResourceId id); | 327 void CreateForTesting(ResourceId id); |
| 328 | 328 |
| 329 GLint WrapModeForTesting(ResourceId id); | 329 GLint WrapModeForTesting(ResourceId id); |
| 330 GLenum TargetForTesting(ResourceId id); |
| 330 | 331 |
| 331 // Sets the current read fence. If a resource is locked for read | 332 // Sets the current read fence. If a resource is locked for read |
| 332 // and has read fences enabled, the resource will not allow writes | 333 // and has read fences enabled, the resource will not allow writes |
| 333 // until this fence has passed. | 334 // until this fence has passed. |
| 334 void SetReadLockFence(scoped_refptr<Fence> fence) { | 335 void SetReadLockFence(scoped_refptr<Fence> fence) { |
| 335 current_read_lock_fence_ = fence; | 336 current_read_lock_fence_ = fence; |
| 336 } | 337 } |
| 337 Fence* GetReadLockFence() { return current_read_lock_fence_.get(); } | 338 Fence* GetReadLockFence() { return current_read_lock_fence_.get(); } |
| 338 | 339 |
| 339 // Enable read lock fences for a specific resource. | 340 // Enable read lock fences for a specific resource. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 | 484 |
| 484 scoped_refptr<Fence> current_read_lock_fence_; | 485 scoped_refptr<Fence> current_read_lock_fence_; |
| 485 bool use_rgba_4444_texture_format_; | 486 bool use_rgba_4444_texture_format_; |
| 486 | 487 |
| 487 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 488 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 488 }; | 489 }; |
| 489 | 490 |
| 490 } // namespace cc | 491 } // namespace cc |
| 491 | 492 |
| 492 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 493 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |