| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 bool CanLockForWrite(ResourceId id); | 325 bool CanLockForWrite(ResourceId id); |
| 326 | 326 |
| 327 cc::ContextProvider* offscreen_context_provider() { | 327 cc::ContextProvider* offscreen_context_provider() { |
| 328 return offscreen_context_provider_.get(); | 328 return offscreen_context_provider_.get(); |
| 329 } | 329 } |
| 330 void set_offscreen_context_provider( | 330 void set_offscreen_context_provider( |
| 331 scoped_refptr<cc::ContextProvider> offscreen_context_provider) { | 331 scoped_refptr<cc::ContextProvider> offscreen_context_provider) { |
| 332 offscreen_context_provider_ = offscreen_context_provider; | 332 offscreen_context_provider_ = offscreen_context_provider; |
| 333 } | 333 } |
| 334 static GLint GetActiveTextureUnit(WebKit::WebGraphicsContext3D* context); | 334 static GLint GetActiveTextureUnit(WebKit::WebGraphicsContext3D* context); |
| 335 bool use_16bit_textures() { return use_16bit_textures_; } |
| 335 | 336 |
| 336 private: | 337 private: |
| 337 struct Resource { | 338 struct Resource { |
| 338 Resource(); | 339 Resource(); |
| 339 ~Resource(); | 340 ~Resource(); |
| 340 Resource(unsigned texture_id, | 341 Resource(unsigned texture_id, |
| 341 gfx::Size size, | 342 gfx::Size size, |
| 342 GLenum format, | 343 GLenum format, |
| 343 GLenum filter, | 344 GLenum filter, |
| 344 GLenum texture_pool, | 345 GLenum texture_pool, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 scoped_ptr<TextureUploader> texture_uploader_; | 437 scoped_ptr<TextureUploader> texture_uploader_; |
| 437 int max_texture_size_; | 438 int max_texture_size_; |
| 438 GLenum best_texture_format_; | 439 GLenum best_texture_format_; |
| 439 | 440 |
| 440 scoped_refptr<cc::ContextProvider> offscreen_context_provider_; | 441 scoped_refptr<cc::ContextProvider> offscreen_context_provider_; |
| 441 | 442 |
| 442 base::ThreadChecker thread_checker_; | 443 base::ThreadChecker thread_checker_; |
| 443 | 444 |
| 444 scoped_refptr<Fence> current_read_lock_fence_; | 445 scoped_refptr<Fence> current_read_lock_fence_; |
| 445 | 446 |
| 447 bool use_16bit_textures_; |
| 448 |
| 446 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 449 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 447 }; | 450 }; |
| 448 | 451 |
| 449 } // namespace cc | 452 } // namespace cc |
| 450 | 453 |
| 451 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 454 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |