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 <algorithm> | 8 #include <algorithm> |
9 #include <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 void StartTracking(TextureRef* texture); | 807 void StartTracking(TextureRef* texture); |
808 void StopTracking(TextureRef* texture); | 808 void StopTracking(TextureRef* texture); |
809 | 809 |
810 void UpdateSafeToRenderFrom(int delta); | 810 void UpdateSafeToRenderFrom(int delta); |
811 void UpdateUnclearedMips(int delta); | 811 void UpdateUnclearedMips(int delta); |
812 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition, | 812 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition, |
813 Texture::CanRenderCondition new_condition); | 813 Texture::CanRenderCondition new_condition); |
814 void UpdateNumImages(int delta); | 814 void UpdateNumImages(int delta); |
815 void IncFramebufferStateChangeCount(); | 815 void IncFramebufferStateChangeCount(); |
816 | 816 |
| 817 GLenum AdjustTexFormat(GLenum format) const; |
| 818 |
817 MemoryTypeTracker* GetMemTracker(GLenum texture_pool); | 819 MemoryTypeTracker* GetMemTracker(GLenum texture_pool); |
818 scoped_ptr<MemoryTypeTracker> memory_tracker_managed_; | 820 scoped_ptr<MemoryTypeTracker> memory_tracker_managed_; |
819 scoped_ptr<MemoryTypeTracker> memory_tracker_unmanaged_; | 821 scoped_ptr<MemoryTypeTracker> memory_tracker_unmanaged_; |
820 | 822 |
821 scoped_refptr<FeatureInfo> feature_info_; | 823 scoped_refptr<FeatureInfo> feature_info_; |
822 | 824 |
823 FramebufferManager* framebuffer_manager_; | 825 FramebufferManager* framebuffer_manager_; |
824 | 826 |
825 // Info for each texture in the system. | 827 // Info for each texture in the system. |
826 typedef base::hash_map<GLuint, scoped_refptr<TextureRef> > TextureMap; | 828 typedef base::hash_map<GLuint, scoped_refptr<TextureRef> > TextureMap; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 private: | 868 private: |
867 DecoderTextureState* texture_state_; | 869 DecoderTextureState* texture_state_; |
868 base::TimeTicks begin_time_; | 870 base::TimeTicks begin_time_; |
869 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); | 871 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); |
870 }; | 872 }; |
871 | 873 |
872 } // namespace gles2 | 874 } // namespace gles2 |
873 } // namespace gpu | 875 } // namespace gpu |
874 | 876 |
875 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 877 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
OLD | NEW |