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

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

Issue 1465993003: Ensured that texture completeness takes into account base and max level (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing compiler warnings Created 5 years, 1 month 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/gles2_cmd_decoder.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
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
index 2ae2561d3294b52c5e975fffd9b9d56bb7dc770e..2f118de18f0d3bd8d3f047740ccf13bcdfb4bb11 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -272,7 +272,9 @@ class GPU_EXPORT Texture {
FaceInfo();
~FaceInfo();
+ // This is relative to base_level and max_level of a texture.
GLsizei num_mip_levels;
+ // This contains slots for all levels starting at 0.
std::vector<LevelInfo> level_infos;
};
@@ -362,10 +364,11 @@ class GPU_EXPORT Texture {
GLenum format,
GLenum type);
- // Returns true if texture mip level is complete relative to first level.
- static bool TextureMipComplete(const Texture::LevelInfo& level0_face,
+ // Returns true if texture mip level is complete relative to base level.
+ // Note that level_diff = level - base_level.
+ static bool TextureMipComplete(const Texture::LevelInfo& base_level_face,
GLenum target,
- GLint level,
+ GLint level_diff,
GLenum internal_format,
GLsizei width,
GLsizei height,
@@ -418,6 +421,10 @@ class GPU_EXPORT Texture {
// referencing this texture.
void IncAllFramebufferStateChangeCount();
+ void UpdateBaseLevel(GLint base_level);
+ void UpdateMaxLevel(GLint max_level);
+ void UpdateNumMipLevels();
+
MailboxManager* mailbox_manager_;
// Info about each face and level of texture.
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698