Index: gpu/command_buffer/service/texture_manager.h |
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h |
index df00607c4774b4e1043f1f58eb9f24c9be38366c..83b0fb6026bbd9123160f69bf9d034aaf7942b0a 100644 |
--- a/gpu/command_buffer/service/texture_manager.h |
+++ b/gpu/command_buffer/service/texture_manager.h |
@@ -276,6 +276,31 @@ class GPU_EXPORT Texture { |
// Returns true if mipmaps can be generated by GL. |
bool CanGenerateMipmaps(const FeatureInfo* feature_info) const; |
+ // Returns true if any of the texture dimensions are not a power of two. |
+ static bool TextureIsNPOT(GLsizei width, GLsizei height, GLsizei depth); |
+ |
+ // Returns true if texture face is complete relative to the first face. |
+ static bool TextureFaceComplete(const Texture::LevelInfo& first_face, |
+ size_t face_index, |
+ GLenum target, |
+ GLenum internal_format, |
+ GLsizei width, |
+ GLsizei height, |
+ GLsizei depth, |
+ GLenum format, |
+ GLenum type); |
+ |
+ // Returns true if texture mip level is complete relative to first level. |
+ static bool TextureMipComplete(const Texture::LevelInfo& level0_face, |
+ GLenum target, |
+ GLint level, |
+ GLenum internal_format, |
+ GLsizei width, |
+ GLsizei height, |
+ GLsizei depth, |
+ GLenum format, |
+ GLenum type); |
+ |
// Sets the Texture's target |
// Parameters: |
// target: GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP or |
@@ -329,6 +354,9 @@ class GPU_EXPORT Texture { |
// Info about each face and level of texture. |
std::vector<std::vector<LevelInfo> > level_infos_; |
+ // Number of mip levels for each level. |
+ std::vector<GLsizei> num_mip_levels_; |
vmiura
2014/10/07 00:13:03
Is this number of mip levels for each face?
If so
David Yen
2014/10/09 20:20:16
Done.
|
+ |
// The texture refs that point to this Texture. |
typedef std::set<TextureRef*> RefSet; |
RefSet refs_; |
@@ -344,6 +372,9 @@ class GPU_EXPORT Texture { |
bool cleared_; |
int num_uncleared_mips_; |
+ int num_npot_faces_; |
+ int num_complete_faces_; |
+ int num_incomplete_mips_; |
// The target. 0 if unset, otherwise GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP. |
GLenum target_; |