| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 kTexture2D, | 474 kTexture2D, |
| 475 kCubeMap, | 475 kCubeMap, |
| 476 kExternalOES, | 476 kExternalOES, |
| 477 kRectangleARB, | 477 kRectangleARB, |
| 478 kNumDefaultTextures | 478 kNumDefaultTextures |
| 479 }; | 479 }; |
| 480 | 480 |
| 481 TextureManager(MemoryTracker* memory_tracker, | 481 TextureManager(MemoryTracker* memory_tracker, |
| 482 FeatureInfo* feature_info, | 482 FeatureInfo* feature_info, |
| 483 GLsizei max_texture_size, | 483 GLsizei max_texture_size, |
| 484 GLsizei max_cube_map_texture_size); | 484 GLsizei max_cube_map_texture_size, |
| 485 bool use_default_textures); |
| 485 ~TextureManager(); | 486 ~TextureManager(); |
| 486 | 487 |
| 487 void set_framebuffer_manager(FramebufferManager* manager) { | 488 void set_framebuffer_manager(FramebufferManager* manager) { |
| 488 framebuffer_manager_ = manager; | 489 framebuffer_manager_ = manager; |
| 489 } | 490 } |
| 490 | 491 |
| 491 // Init the texture manager. | 492 // Init the texture manager. |
| 492 bool Initialize(); | 493 bool Initialize(); |
| 493 | 494 |
| 494 // Must call before destruction. | 495 // Must call before destruction. |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 | 768 |
| 768 // Info for each texture in the system. | 769 // Info for each texture in the system. |
| 769 typedef base::hash_map<GLuint, scoped_refptr<TextureRef> > TextureMap; | 770 typedef base::hash_map<GLuint, scoped_refptr<TextureRef> > TextureMap; |
| 770 TextureMap textures_; | 771 TextureMap textures_; |
| 771 | 772 |
| 772 GLsizei max_texture_size_; | 773 GLsizei max_texture_size_; |
| 773 GLsizei max_cube_map_texture_size_; | 774 GLsizei max_cube_map_texture_size_; |
| 774 GLint max_levels_; | 775 GLint max_levels_; |
| 775 GLint max_cube_map_levels_; | 776 GLint max_cube_map_levels_; |
| 776 | 777 |
| 778 const bool use_default_textures_; |
| 779 |
| 777 int num_unrenderable_textures_; | 780 int num_unrenderable_textures_; |
| 778 int num_unsafe_textures_; | 781 int num_unsafe_textures_; |
| 779 int num_uncleared_mips_; | 782 int num_uncleared_mips_; |
| 780 int num_images_; | 783 int num_images_; |
| 781 | 784 |
| 782 // Counts the number of Textures allocated with 'this' as its manager. | 785 // Counts the number of Textures allocated with 'this' as its manager. |
| 783 // Allows to check no Texture will outlive this. | 786 // Allows to check no Texture will outlive this. |
| 784 unsigned int texture_count_; | 787 unsigned int texture_count_; |
| 785 | 788 |
| 786 bool have_context_; | 789 bool have_context_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 807 private: | 810 private: |
| 808 DecoderTextureState* texture_state_; | 811 DecoderTextureState* texture_state_; |
| 809 base::TimeTicks begin_time_; | 812 base::TimeTicks begin_time_; |
| 810 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); | 813 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); |
| 811 }; | 814 }; |
| 812 | 815 |
| 813 } // namespace gles2 | 816 } // namespace gles2 |
| 814 } // namespace gpu | 817 } // namespace gpu |
| 815 | 818 |
| 816 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 819 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
| OLD | NEW |