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

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

Issue 5270010: Revert 67662 - FBTF: Remove unneeded headers from base/ (part 10)... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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/command_buffer_service.h ('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 67673)
+++ gpu/command_buffer/service/texture_manager.h (working copy)
@@ -8,6 +8,7 @@
#include <map>
#include <vector>
#include "base/basictypes.h"
+#include "base/logging.h"
#include "base/ref_counted.h"
#include "gpu/command_buffer/service/gl_utils.h"
@@ -166,7 +167,15 @@
// Parameters:
// target: GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP
// max_levels: The maximum levels this type of target can have.
- void SetTarget(GLenum target, GLint max_levels);
+ void SetTarget(GLenum target, GLint max_levels) {
+ DCHECK_EQ(0u, target_); // you can only set this once.
+ target_ = target;
+ size_t num_faces = (target == GL_TEXTURE_2D) ? 1 : 6;
+ level_infos_.resize(num_faces);
+ for (size_t ii = 0; ii < num_faces; ++ii) {
+ level_infos_[ii].resize(max_levels);
+ }
+ }
// Update info about this texture.
void Update(const FeatureInfo* feature_info);
@@ -235,7 +244,10 @@
// Parameters:
// target: GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP
// max_levels: The maximum levels this type of target can have.
- void SetInfoTarget(TextureInfo* info, GLenum target);
+ void SetInfoTarget(TextureInfo* info, GLenum target) {
+ DCHECK(info);
+ info->SetTarget(target, MaxLevelsForTarget(target));
+ }
// Set the info for a particular level in a TexureInfo.
void SetLevelInfo(
@@ -320,3 +332,4 @@
} // namespace gpu
#endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
+
« no previous file with comments | « gpu/command_buffer/service/command_buffer_service.h ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698