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

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

Issue 1838923002: Workaround UNPACK_ROW_LENGTH driver bugs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 // total_texture_upload_time automatically initialized to 0 in default 639 // total_texture_upload_time automatically initialized to 0 in default
640 // constructor. 640 // constructor.
641 explicit DecoderTextureState(const FeatureInfo::Workarounds& workarounds) 641 explicit DecoderTextureState(const FeatureInfo::Workarounds& workarounds)
642 : tex_image_failed(false), 642 : tex_image_failed(false),
643 texture_upload_count(0), 643 texture_upload_count(0),
644 texsubimage_faster_than_teximage( 644 texsubimage_faster_than_teximage(
645 workarounds.texsubimage_faster_than_teximage), 645 workarounds.texsubimage_faster_than_teximage),
646 force_cube_map_positive_x_allocation( 646 force_cube_map_positive_x_allocation(
647 workarounds.force_cube_map_positive_x_allocation), 647 workarounds.force_cube_map_positive_x_allocation),
648 force_cube_complete(workarounds.force_cube_complete), 648 force_cube_complete(workarounds.force_cube_complete),
649 unpack_alignment_workaround_with_unpack_buffer( 649 unpack_parameters_workaround_with_unpack_buffer(
650 workarounds.unpack_alignment_workaround_with_unpack_buffer) {} 650 workarounds.unpack_parameters_workaround_with_unpack_buffer) {}
651 651
652 // This indicates all the following texSubImage*D calls that are part of the 652 // This indicates all the following texSubImage*D calls that are part of the
653 // failed texImage*D call should be ignored. The client calls have a lock 653 // failed texImage*D call should be ignored. The client calls have a lock
654 // around them, so it will affect only a single texImage*D + texSubImage*D 654 // around them, so it will affect only a single texImage*D + texSubImage*D
655 // group. 655 // group.
656 bool tex_image_failed; 656 bool tex_image_failed;
657 657
658 // Command buffer stats. 658 // Command buffer stats.
659 int texture_upload_count; 659 int texture_upload_count;
660 base::TimeDelta total_texture_upload_time; 660 base::TimeDelta total_texture_upload_time;
661 661
662 bool texsubimage_faster_than_teximage; 662 bool texsubimage_faster_than_teximage;
663 bool force_cube_map_positive_x_allocation; 663 bool force_cube_map_positive_x_allocation;
664 bool force_cube_complete; 664 bool force_cube_complete;
665 bool unpack_alignment_workaround_with_unpack_buffer; 665 bool unpack_parameters_workaround_with_unpack_buffer;
666 }; 666 };
667 667
668 // This class keeps track of the textures and their sizes so we can do NPOT and 668 // This class keeps track of the textures and their sizes so we can do NPOT and
669 // texture complete checking. 669 // texture complete checking.
670 // 670 //
671 // NOTE: To support shared resources an instance of this class will need to be 671 // NOTE: To support shared resources an instance of this class will need to be
672 // shared by multiple GLES2Decoders. 672 // shared by multiple GLES2Decoders.
673 class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider { 673 class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider {
674 public: 674 public:
675 class GPU_EXPORT DestructionObserver { 675 class GPU_EXPORT DestructionObserver {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 GLuint* black_texture); 1056 GLuint* black_texture);
1057 1057
1058 void DoTexImage( 1058 void DoTexImage(
1059 DecoderTextureState* texture_state, 1059 DecoderTextureState* texture_state,
1060 ContextState* state, 1060 ContextState* state,
1061 DecoderFramebufferState* framebuffer_state, 1061 DecoderFramebufferState* framebuffer_state,
1062 const char* function_name, 1062 const char* function_name,
1063 TextureRef* texture_ref, 1063 TextureRef* texture_ref,
1064 const DoTexImageArguments& args); 1064 const DoTexImageArguments& args);
1065 1065
1066 void DoTexSubImageWithAlignmentWorkaround( 1066 void DoTexSubImageWithUnpackParamsWorkaround(
1067 DecoderTextureState* texture_state, 1067 DecoderTextureState* texture_state,
1068 ContextState* state, 1068 ContextState* state,
1069 const DoTexSubImageArguments& args); 1069 const DoTexSubImageArguments& args);
1070 1070
1071 void StartTracking(TextureRef* texture); 1071 void StartTracking(TextureRef* texture);
1072 void StopTracking(TextureRef* texture); 1072 void StopTracking(TextureRef* texture);
1073 1073
1074 void UpdateSafeToRenderFrom(int delta); 1074 void UpdateSafeToRenderFrom(int delta);
1075 void UpdateUnclearedMips(int delta); 1075 void UpdateUnclearedMips(int delta);
1076 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition, 1076 void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 private: 1138 private:
1139 DecoderTextureState* texture_state_; 1139 DecoderTextureState* texture_state_;
1140 base::TimeTicks begin_time_; 1140 base::TimeTicks begin_time_;
1141 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); 1141 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer);
1142 }; 1142 };
1143 1143
1144 } // namespace gles2 1144 } // namespace gles2
1145 } // namespace gpu 1145 } // namespace gpu
1146 1146
1147 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 1147 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698