Chromium Code Reviews| 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 e97feb327f1c5a37b6edc98fd1d4a39c21885657..b494f12075d66e18618edd59a2281d86a905af4e 100644 |
| --- a/gpu/command_buffer/service/texture_manager.h |
| +++ b/gpu/command_buffer/service/texture_manager.h |
| @@ -215,16 +215,17 @@ class GPU_EXPORT Texture { |
| void RemoveTextureRef(TextureRef* ref, bool have_context); |
| MemoryTypeTracker* GetMemTracker(); |
| - // Condition on which this texture is renderable. Can be ONLY_IF_NPOT if it |
| + // Condition on which this texture is complete. Can be ONLY_IF_NPOT if it |
| // depends on context support for non-power-of-two textures (i.e. will be |
| - // renderable if NPOT support is in the context, otherwise not, e.g. texture |
| + // complete if NPOT support is in the context, otherwise not, e.g. texture |
| // with a NPOT level). ALWAYS means it doesn't depend on context features |
| - // (e.g. complete POT), NEVER means it's not renderable regardless (e.g. |
| + // (e.g. complete POT), NEVER means it's not complete regardless (e.g. |
| // incomplete). |
| - enum CanRenderCondition { |
| - CAN_RENDER_ALWAYS, |
| - CAN_RENDER_NEVER, |
| - CAN_RENDER_ONLY_IF_NPOT |
| + // See section 3.7.10 of the GLES2 spec. |
| + enum TextureCompleteness { |
| + TEXTURE_COMPLETE_ALWAYS, |
| + TEXTURE_INCOMPLETE, |
| + TEXTURE_COMPLETE_ONLY_IF_NPOT |
| }; |
| struct LevelInfo { |
| @@ -270,12 +271,12 @@ class GPU_EXPORT Texture { |
| // In GLES2 "texture complete" means it has all required mips for filtering |
| // down to a 1x1 pixel texture, they are in the correct order, they are all |
| // the same format. |
| - bool texture_complete() const { |
| - return texture_complete_; |
| - } |
| + // See section 3.7.10 of the GLES2 spec. |
| + bool texture_2d_complete() const { return texture_2d_complete_; } |
| // In GLES2 "cube complete" means all 6 faces level 0 are defined, all the |
| // same format, all the same dimensions and all width = height. |
| + // See section 3.7.10 of the GLES2 spec. |
| bool cube_complete() const { |
| return cube_complete_; |
| } |
| @@ -320,8 +321,8 @@ class GPU_EXPORT Texture { |
| } |
| // True if this texture meets all the GLES2 criteria for rendering. |
| - // See section 3.8.2 of the GLES2 spec. |
|
dshwang
2015/08/17 16:20:41
section 3.8.2 is "Shader Execution", which isn't r
Ken Russell (switch to Gerrit)
2015/08/17 21:32:27
On the contrary: it is related. In GLES2 a texture
dshwang
2015/08/18 07:18:16
I see. Let me not change the name. mentioning sect
|
| - bool CanRender(const FeatureInfo* feature_info) const; |
| + // See section 3.7.10 of the GLES2 spec. |
| + bool IsTextureComplete(const FeatureInfo* feature_info) const; |
| // Returns true if mipmaps can be generated by GL. |
| bool CanGenerateMipmaps(const FeatureInfo* feature_info) const; |
| @@ -388,12 +389,12 @@ class GPU_EXPORT Texture { |
| GLsizei height, |
| const gfx::Rect& cleared_rect); |
| - // Computes the CanRenderCondition flag. |
| - CanRenderCondition GetCanRenderCondition() const; |
| + // Computes the TextureCompleteness flag. |
| + TextureCompleteness GetTextureCompleteness() const; |
| // Updates the unrenderable texture count in all the managers referencing this |
| // texture. |
| - void UpdateCanRenderCondition(); |
| + void UpdateTextureCompleteness(); |
| // Updates the images count in all the managers referencing this |
| // texture. |
| @@ -448,7 +449,7 @@ class GPU_EXPORT Texture { |
| GLint max_level_set_; |
| // Whether or not this texture is "texture complete" |
| - bool texture_complete_; |
| + bool texture_2d_complete_; |
| // Whether mip levels have changed and should be reverified. |
| bool texture_mips_dirty_; |
| @@ -480,8 +481,8 @@ class GPU_EXPORT Texture { |
| // Size in bytes this texture is assumed to take in memory. |
| uint32 estimated_size_; |
| - // Cache of the computed CanRenderCondition flag. |
| - CanRenderCondition can_render_condition_; |
| + // Cache of the computed TextureCompleteness flag. |
| + TextureCompleteness texture_completeness; |
| // Whether we have initialized TEXTURE_MAX_ANISOTROPY to 1. |
| bool texture_max_anisotropy_initialized_; |
| @@ -643,9 +644,9 @@ class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider { |
| GLsizei width, GLsizei height, GLsizei depth); |
| // True if this texture meets all the GLES2 criteria for rendering. |
| - // See section 3.8.2 of the GLES2 spec. |
| - bool CanRender(const TextureRef* ref) const { |
| - return ref->texture()->CanRender(feature_info_.get()); |
| + // See section 3.7.10 of the GLES2 spec. |
| + bool IsTextureComplete(const TextureRef* ref) const { |
| + return ref->texture()->IsTextureComplete(feature_info_.get()); |
| } |
| // Returns true if mipmaps can be generated by GL. |
| @@ -893,8 +894,8 @@ class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider { |
| void UpdateSafeToRenderFrom(int delta); |
| void UpdateUnclearedMips(int delta); |
| - void UpdateCanRenderCondition(Texture::CanRenderCondition old_condition, |
| - Texture::CanRenderCondition new_condition); |
| + void UpdateTextureCompleteness(Texture::TextureCompleteness old_completeness, |
| + Texture::TextureCompleteness new_completeness); |
| void UpdateNumImages(int delta); |
| void IncFramebufferStateChangeCount(); |