Index: gpu/command_buffer/service/texture_manager.h |
=================================================================== |
--- gpu/command_buffer/service/texture_manager.h (revision 48721) |
+++ gpu/command_buffer/service/texture_manager.h (working copy) |
@@ -78,30 +78,11 @@ |
// Returns true if mipmaps can be generated by GL. |
bool CanGenerateMipmaps() const; |
- // Makes each of the mip levels as though they were generated. |
- bool MarkMipmapsGenerated(); |
- |
- // Set the info for a particular level. |
- void SetLevelInfo( |
- GLenum target, |
- GLint level, |
- GLint internal_format, |
- GLsizei width, |
- GLsizei height, |
- GLsizei depth, |
- GLint border, |
- GLenum format, |
- GLenum type); |
- |
// Get the width and height for a particular level. Returns false if level |
// does not exist. |
bool GetLevelSize( |
GLint face, GLint level, GLsizei* width, GLsizei* height) const; |
- // Sets a texture parameter. |
- // TODO(gman): Expand to SetParameteri,f,iv,fv |
- void SetParameter(GLenum pname, GLint param); |
- |
bool IsDeleted() const { |
return deleted_; |
} |
@@ -134,6 +115,25 @@ |
GLenum type; |
}; |
+ // Set the info for a particular level. |
+ void SetLevelInfo( |
+ GLenum target, |
+ GLint level, |
+ GLint internal_format, |
+ GLsizei width, |
+ GLsizei height, |
+ GLsizei depth, |
+ GLint border, |
+ GLenum format, |
+ GLenum type); |
+ |
+ // Sets a texture parameter. |
+ // TODO(gman): Expand to SetParameteri,f,iv,fv |
+ void SetParameter(GLenum pname, GLint param); |
+ |
+ // Makes each of the mip levels as though they were generated. |
+ bool MarkMipmapsGenerated(); |
+ |
void MarkAsDeleted() { |
service_id_ = 0; |
deleted_ = true; |
@@ -221,6 +221,26 @@ |
info->SetTarget(target, MaxLevelsForTarget(target)); |
} |
+ // Set the info for a particular level in a TexureInfo. |
+ void SetLevelInfo( |
+ TextureInfo* info, |
+ GLenum target, |
+ GLint level, |
+ GLint internal_format, |
+ GLsizei width, |
+ GLsizei height, |
+ GLsizei depth, |
+ GLint border, |
+ GLenum format, |
+ GLenum type); |
+ |
+ // Sets a texture parameter of a TextureInfo |
+ // TODO(gman): Expand to SetParameteri,f,iv,fv |
+ void SetParameter(TextureInfo* info, GLenum pname, GLint param); |
+ |
+ // Makes each of the mip levels as though they were generated. |
+ bool MarkMipmapsGenerated(TextureInfo* info); |
+ |
// Creates a new texture info. |
TextureInfo* CreateTextureInfo(GLuint client_id, GLuint service_id); |
@@ -238,6 +258,10 @@ |
default_texture_cube_map_; |
} |
+ bool HaveUnrenderableTextures() const { |
+ return num_unrenderable_textures_ > 0; |
+ } |
+ |
private: |
// Info for each texture in the system. |
// TODO(gman): Choose a faster container. |
@@ -249,6 +273,8 @@ |
GLint max_levels_; |
GLint max_cube_map_levels_; |
+ int num_unrenderable_textures_; |
+ |
// The default textures for each target (texture name = 0) |
TextureInfo::Ref default_texture_2d_; |
TextureInfo::Ref default_texture_cube_map_; |