Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Side by Side Diff: gpu/command_buffer/service/texture_manager.h

Issue 2348243002: Force CUBE_MAP_POSITIVE_X texture allocation before CopyTexImage2D on Intel Mac (Closed)
Patch Set: fix unpack buffer Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
1123 private: 1134 private:
1124 friend class Texture; 1135 friend class Texture;
1125 friend class TextureRef; 1136 friend class TextureRef;
1126 1137
1127 // Helper for Initialize(). 1138 // Helper for Initialize().
1128 scoped_refptr<TextureRef> CreateDefaultAndBlackTextures( 1139 scoped_refptr<TextureRef> CreateDefaultAndBlackTextures(
1129 GLenum target, 1140 GLenum target,
1130 GLuint* black_texture); 1141 GLuint* black_texture);
1131 1142
1132 void DoTexImage( 1143 void DoTexImage(
(...skipping 17 matching lines...) Expand all
1150 void DoTexSubImageWithAlignmentWorkaround( 1161 void DoTexSubImageWithAlignmentWorkaround(
1151 DecoderTextureState* texture_state, 1162 DecoderTextureState* texture_state,
1152 ContextState* state, 1163 ContextState* state,
1153 const DoTexSubImageArguments& args); 1164 const DoTexSubImageArguments& args);
1154 1165
1155 void DoTexSubImageRowByRowWorkaround(DecoderTextureState* texture_state, 1166 void DoTexSubImageRowByRowWorkaround(DecoderTextureState* texture_state,
1156 ContextState* state, 1167 ContextState* state,
1157 const DoTexSubImageArguments& args, 1168 const DoTexSubImageArguments& args,
1158 const PixelStoreParams& unpack_params); 1169 const PixelStoreParams& unpack_params);
1159 1170
1171 void DoCubeMapWorkaround(
1172 DecoderTextureState* texture_state,
1173 ContextState* state,
1174 DecoderFramebufferState* framebuffer_state,
1175 TextureRef* texture_ref,
1176 const char* function_name,
1177 const DoTexImageArguments& args);
1178
1160 void StartTracking(TextureRef* texture); 1179 void StartTracking(TextureRef* texture);
1161 void StopTracking(TextureRef* texture); 1180 void StopTracking(TextureRef* texture);
1162 1181
1163 void UpdateSafeToRenderFrom(int delta); 1182 void UpdateSafeToRenderFrom(int delta);
1164 void UpdateUnclearedMips(int delta); 1183 void UpdateUnclearedMips(int delta);
1165 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition, 1184 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition,
1166 Texture::CanRenderCondition new_condition); 1185 Texture::CanRenderCondition new_condition);
1167 void UpdateNumImages(int delta); 1186 void UpdateNumImages(int delta);
1168 void IncFramebufferStateChangeCount(); 1187 void IncFramebufferStateChangeCount();
1169 1188
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 private: 1247 private:
1229 DecoderTextureState* texture_state_; 1248 DecoderTextureState* texture_state_;
1230 base::TimeTicks begin_time_; 1249 base::TimeTicks begin_time_;
1231 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); 1250 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer);
1232 }; 1251 };
1233 1252
1234 } // namespace gles2 1253 } // namespace gles2
1235 } // namespace gpu 1254 } // namespace gpu
1236 1255
1237 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 1256 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698