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

Unified Diff: gpu/command_buffer/service/texture_manager.h

Issue 3150026: Fixes for the default texture.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.h
===================================================================
--- gpu/command_buffer/service/texture_manager.h (revision 57082)
+++ gpu/command_buffer/service/texture_manager.h (working copy)
@@ -217,6 +217,9 @@
GLsizei max_cube_map_texture_size);
~TextureManager();
+ // Init the texture manager.
+ bool Initialize();
+
// Must call before destruction.
void Destroy(bool have_context);
@@ -302,6 +305,11 @@
return num_unrenderable_textures_ > 0;
}
+ GLuint black_texture_id(GLenum target) const {
+ return target == GL_SAMPLER_2D ? black_2d_texture_id_ :
+ black_cube_texture_id_;
+ }
+
private:
// Info for each texture in the system.
// TODO(gman): Choose a faster container.
@@ -318,6 +326,12 @@
int num_unrenderable_textures_;
+ // Black (0,0,0,1) textures for when non-renderable textures are used.
+ // NOTE: There is no corresponding TextureInfo for these textures.
+ // TextureInfos are only for textures the client side can access.
+ GLuint black_2d_texture_id_;
+ GLuint black_cube_texture_id_;
+
// The default textures for each target (texture name = 0)
TextureInfo::Ref default_texture_2d_;
TextureInfo::Ref default_texture_cube_map_;
« 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