| 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 } | 318 } |
| 319 Fence* GetReadLockFence() { return current_read_lock_fence_.get(); } | 319 Fence* GetReadLockFence() { return current_read_lock_fence_.get(); } |
| 320 | 320 |
| 321 // Enable read lock fences for a specific resource. | 321 // Enable read lock fences for a specific resource. |
| 322 void EnableReadLockFences(ResourceProvider::ResourceId id, bool enable); | 322 void EnableReadLockFences(ResourceProvider::ResourceId id, bool enable); |
| 323 | 323 |
| 324 // Indicates if we can currently lock this resource for write. | 324 // Indicates if we can currently lock this resource for write. |
| 325 bool CanLockForWrite(ResourceId id); | 325 bool CanLockForWrite(ResourceId id); |
| 326 | 326 |
| 327 static GLint GetActiveTextureUnit(WebKit::WebGraphicsContext3D* context); | 327 static GLint GetActiveTextureUnit(WebKit::WebGraphicsContext3D* context); |
| 328 bool use_16_bit_textures() { return use_16_bit_textures_; } |
| 328 | 329 |
| 329 private: | 330 private: |
| 330 struct Resource { | 331 struct Resource { |
| 331 Resource(); | 332 Resource(); |
| 332 ~Resource(); | 333 ~Resource(); |
| 333 Resource(unsigned texture_id, | 334 Resource(unsigned texture_id, |
| 334 gfx::Size size, | 335 gfx::Size size, |
| 335 GLenum format, | 336 GLenum format, |
| 336 GLenum filter, | 337 GLenum filter, |
| 337 GLenum texture_pool, | 338 GLenum texture_pool, |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 bool use_texture_usage_hint_; | 433 bool use_texture_usage_hint_; |
| 433 bool use_shallow_flush_; | 434 bool use_shallow_flush_; |
| 434 scoped_ptr<TextureUploader> texture_uploader_; | 435 scoped_ptr<TextureUploader> texture_uploader_; |
| 435 int max_texture_size_; | 436 int max_texture_size_; |
| 436 GLenum best_texture_format_; | 437 GLenum best_texture_format_; |
| 437 | 438 |
| 438 base::ThreadChecker thread_checker_; | 439 base::ThreadChecker thread_checker_; |
| 439 | 440 |
| 440 scoped_refptr<Fence> current_read_lock_fence_; | 441 scoped_refptr<Fence> current_read_lock_fence_; |
| 441 | 442 |
| 443 bool use_16_bit_textures_; |
| 444 |
| 442 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 445 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 443 }; | 446 }; |
| 444 | 447 |
| 445 } // namespace cc | 448 } // namespace cc |
| 446 | 449 |
| 447 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 450 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |