| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <list> | 12 #include <list> |
| 13 #include <memory> |
| 13 #include <set> | 14 #include <set> |
| 14 #include <string> | 15 #include <string> |
| 15 #include <vector> | 16 #include <vector> |
| 17 |
| 16 #include "base/containers/hash_tables.h" | 18 #include "base/containers/hash_tables.h" |
| 17 #include "base/macros.h" | 19 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
| 19 #include "gpu/command_buffer/service/feature_info.h" | 21 #include "gpu/command_buffer/service/feature_info.h" |
| 20 #include "gpu/command_buffer/service/gl_utils.h" | 22 #include "gpu/command_buffer/service/gl_utils.h" |
| 21 #include "gpu/command_buffer/service/memory_tracking.h" | 23 #include "gpu/command_buffer/service/memory_tracking.h" |
| 22 #include "gpu/command_buffer/service/sampler_manager.h" | 24 #include "gpu/command_buffer/service/sampler_manager.h" |
| 23 #include "gpu/gpu_export.h" | 25 #include "gpu/gpu_export.h" |
| 24 #include "ui/gfx/geometry/rect.h" | 26 #include "ui/gfx/geometry/rect.h" |
| 25 #include "ui/gl/gl_image.h" | 27 #include "ui/gl/gl_image.h" |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition, | 1089 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition, |
| 1088 Texture::CanRenderCondition new_condition); | 1090 Texture::CanRenderCondition new_condition); |
| 1089 void UpdateNumImages(int delta); | 1091 void UpdateNumImages(int delta); |
| 1090 void IncFramebufferStateChangeCount(); | 1092 void IncFramebufferStateChangeCount(); |
| 1091 | 1093 |
| 1092 // Helper function called by OnMemoryDump. | 1094 // Helper function called by OnMemoryDump. |
| 1093 void DumpTextureRef(base::trace_event::ProcessMemoryDump* pmd, | 1095 void DumpTextureRef(base::trace_event::ProcessMemoryDump* pmd, |
| 1094 TextureRef* ref); | 1096 TextureRef* ref); |
| 1095 | 1097 |
| 1096 MemoryTypeTracker* GetMemTracker(); | 1098 MemoryTypeTracker* GetMemTracker(); |
| 1097 scoped_ptr<MemoryTypeTracker> memory_type_tracker_; | 1099 std::unique_ptr<MemoryTypeTracker> memory_type_tracker_; |
| 1098 MemoryTracker* memory_tracker_; | 1100 MemoryTracker* memory_tracker_; |
| 1099 | 1101 |
| 1100 scoped_refptr<FeatureInfo> feature_info_; | 1102 scoped_refptr<FeatureInfo> feature_info_; |
| 1101 | 1103 |
| 1102 FramebufferManager* framebuffer_manager_; | 1104 FramebufferManager* framebuffer_manager_; |
| 1103 | 1105 |
| 1104 // Info for each texture in the system. | 1106 // Info for each texture in the system. |
| 1105 typedef base::hash_map<GLuint, scoped_refptr<TextureRef> > TextureMap; | 1107 typedef base::hash_map<GLuint, scoped_refptr<TextureRef> > TextureMap; |
| 1106 TextureMap textures_; | 1108 TextureMap textures_; |
| 1107 | 1109 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 private: | 1151 private: |
| 1150 DecoderTextureState* texture_state_; | 1152 DecoderTextureState* texture_state_; |
| 1151 base::TimeTicks begin_time_; | 1153 base::TimeTicks begin_time_; |
| 1152 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); | 1154 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); |
| 1153 }; | 1155 }; |
| 1154 | 1156 |
| 1155 } // namespace gles2 | 1157 } // namespace gles2 |
| 1156 } // namespace gpu | 1158 } // namespace gpu |
| 1157 | 1159 |
| 1158 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 1160 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
| OLD | NEW |