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

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

Issue 224763002: Remove default textures in (!bind_generates_resource) context groups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use kBindGeneratesResource in context_group_unittest.cc. Created 6 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
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 <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 kTexture2D, 474 kTexture2D,
475 kCubeMap, 475 kCubeMap,
476 kExternalOES, 476 kExternalOES,
477 kRectangleARB, 477 kRectangleARB,
478 kNumDefaultTextures 478 kNumDefaultTextures
479 }; 479 };
480 480
481 TextureManager(MemoryTracker* memory_tracker, 481 TextureManager(MemoryTracker* memory_tracker,
482 FeatureInfo* feature_info, 482 FeatureInfo* feature_info,
483 GLsizei max_texture_size, 483 GLsizei max_texture_size,
484 GLsizei max_cube_map_texture_size); 484 GLsizei max_cube_map_texture_size,
485 bool use_default_textures);
485 ~TextureManager(); 486 ~TextureManager();
486 487
487 void set_framebuffer_manager(FramebufferManager* manager) { 488 void set_framebuffer_manager(FramebufferManager* manager) {
488 framebuffer_manager_ = manager; 489 framebuffer_manager_ = manager;
489 } 490 }
490 491
491 // Init the texture manager. 492 // Init the texture manager.
492 bool Initialize(); 493 bool Initialize();
493 494
494 // Must call before destruction. 495 // Must call before destruction.
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 768
768 // Info for each texture in the system. 769 // Info for each texture in the system.
769 typedef base::hash_map<GLuint, scoped_refptr<TextureRef> > TextureMap; 770 typedef base::hash_map<GLuint, scoped_refptr<TextureRef> > TextureMap;
770 TextureMap textures_; 771 TextureMap textures_;
771 772
772 GLsizei max_texture_size_; 773 GLsizei max_texture_size_;
773 GLsizei max_cube_map_texture_size_; 774 GLsizei max_cube_map_texture_size_;
774 GLint max_levels_; 775 GLint max_levels_;
775 GLint max_cube_map_levels_; 776 GLint max_cube_map_levels_;
776 777
778 const bool use_default_textures_;
779
777 int num_unrenderable_textures_; 780 int num_unrenderable_textures_;
778 int num_unsafe_textures_; 781 int num_unsafe_textures_;
779 int num_uncleared_mips_; 782 int num_uncleared_mips_;
780 int num_images_; 783 int num_images_;
781 784
782 // Counts the number of Textures allocated with 'this' as its manager. 785 // Counts the number of Textures allocated with 'this' as its manager.
783 // Allows to check no Texture will outlive this. 786 // Allows to check no Texture will outlive this.
784 unsigned int texture_count_; 787 unsigned int texture_count_;
785 788
786 bool have_context_; 789 bool have_context_;
(...skipping 20 matching lines...) Expand all
807 private: 810 private:
808 DecoderTextureState* texture_state_; 811 DecoderTextureState* texture_state_;
809 base::TimeTicks begin_time_; 812 base::TimeTicks begin_time_;
810 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); 813 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer);
811 }; 814 };
812 815
813 } // namespace gles2 816 } // namespace gles2
814 } // namespace gpu 817 } // namespace gpu
815 818
816 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 819 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/test_helper.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698