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 |
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 // Get / set the current generation number of this manager. This generation | 1113 // Get / set the current generation number of this manager. This generation |
1114 // number changes whenever the service_id of one or more Textures change. | 1114 // number changes whenever the service_id of one or more Textures change. |
1115 uint32_t GetServiceIdGeneration() const; | 1115 uint32_t GetServiceIdGeneration() const; |
1116 void IncrementServiceIdGeneration(); | 1116 void IncrementServiceIdGeneration(); |
1117 | 1117 |
1118 static GLenum AdjustTexInternalFormat(const gles2::FeatureInfo* feature_info, | 1118 static GLenum AdjustTexInternalFormat(const gles2::FeatureInfo* feature_info, |
1119 GLenum format); | 1119 GLenum format); |
1120 static GLenum AdjustTexFormat(const gles2::FeatureInfo* feature_info, | 1120 static GLenum AdjustTexFormat(const gles2::FeatureInfo* feature_info, |
1121 GLenum format); | 1121 GLenum format); |
1122 | 1122 |
| 1123 void WorkaroundCopyTexImageCubeMap( |
| 1124 DecoderTextureState* texture_state, |
| 1125 ContextState* state, |
| 1126 DecoderFramebufferState* framebuffer_state, |
| 1127 TextureRef* texture_ref, |
| 1128 const char* function_name, |
| 1129 const DoTexImageArguments& args) { |
| 1130 DoCubeMapWorkaround(texture_state, state, framebuffer_state, |
| 1131 texture_ref, function_name, args); |
| 1132 } |
| 1133 |
| 1134 |
1123 private: | 1135 private: |
1124 friend class Texture; | 1136 friend class Texture; |
1125 friend class TextureRef; | 1137 friend class TextureRef; |
1126 | 1138 |
1127 // Helper for Initialize(). | 1139 // Helper for Initialize(). |
1128 scoped_refptr<TextureRef> CreateDefaultAndBlackTextures( | 1140 scoped_refptr<TextureRef> CreateDefaultAndBlackTextures( |
1129 GLenum target, | 1141 GLenum target, |
1130 GLuint* black_texture); | 1142 GLuint* black_texture); |
1131 | 1143 |
1132 void DoTexImage( | 1144 void DoTexImage( |
(...skipping 17 matching lines...) Expand all Loading... |
1150 void DoTexSubImageWithAlignmentWorkaround( | 1162 void DoTexSubImageWithAlignmentWorkaround( |
1151 DecoderTextureState* texture_state, | 1163 DecoderTextureState* texture_state, |
1152 ContextState* state, | 1164 ContextState* state, |
1153 const DoTexSubImageArguments& args); | 1165 const DoTexSubImageArguments& args); |
1154 | 1166 |
1155 void DoTexSubImageRowByRowWorkaround(DecoderTextureState* texture_state, | 1167 void DoTexSubImageRowByRowWorkaround(DecoderTextureState* texture_state, |
1156 ContextState* state, | 1168 ContextState* state, |
1157 const DoTexSubImageArguments& args, | 1169 const DoTexSubImageArguments& args, |
1158 const PixelStoreParams& unpack_params); | 1170 const PixelStoreParams& unpack_params); |
1159 | 1171 |
| 1172 void DoCubeMapWorkaround( |
| 1173 DecoderTextureState* texture_state, |
| 1174 ContextState* state, |
| 1175 DecoderFramebufferState* framebuffer_state, |
| 1176 TextureRef* texture_ref, |
| 1177 const char* function_name, |
| 1178 const DoTexImageArguments& args); |
| 1179 |
1160 void StartTracking(TextureRef* texture); | 1180 void StartTracking(TextureRef* texture); |
1161 void StopTracking(TextureRef* texture); | 1181 void StopTracking(TextureRef* texture); |
1162 | 1182 |
1163 void UpdateSafeToRenderFrom(int delta); | 1183 void UpdateSafeToRenderFrom(int delta); |
1164 void UpdateUnclearedMips(int delta); | 1184 void UpdateUnclearedMips(int delta); |
1165 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition, | 1185 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition, |
1166 Texture::CanRenderCondition new_condition); | 1186 Texture::CanRenderCondition new_condition); |
1167 void UpdateNumImages(int delta); | 1187 void UpdateNumImages(int delta); |
1168 void IncFramebufferStateChangeCount(); | 1188 void IncFramebufferStateChangeCount(); |
1169 | 1189 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1228 private: | 1248 private: |
1229 DecoderTextureState* texture_state_; | 1249 DecoderTextureState* texture_state_; |
1230 base::TimeTicks begin_time_; | 1250 base::TimeTicks begin_time_; |
1231 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); | 1251 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); |
1232 }; | 1252 }; |
1233 | 1253 |
1234 } // namespace gles2 | 1254 } // namespace gles2 |
1235 } // namespace gpu | 1255 } // namespace gpu |
1236 | 1256 |
1237 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 1257 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
OLD | NEW |