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

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

Issue 5139006: FBTF: Remove unneeded headers from base/ (part 10) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac, cros build 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/texture_manager.h ('k') | net/base/directory_lister.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
===================================================================
--- gpu/command_buffer/service/texture_manager.cc (revision 67155)
+++ gpu/command_buffer/service/texture_manager.cc (working copy)
@@ -3,7 +3,11 @@
// found in the LICENSE file.
#include "gpu/command_buffer/service/texture_manager.h"
+
+#include <algorithm>
+
#include "base/bits.h"
+#include "base/logging.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
@@ -277,6 +281,16 @@
Update(feature_info);
}
+void TextureManager::TextureInfo::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);
+ }
+}
+
void TextureManager::TextureInfo::Update(const FeatureInfo* feature_info) {
// Update npot status.
npot_ = false;
@@ -426,6 +440,11 @@
(target != GL_TEXTURE_2D || (depth == 1));
}
+void TextureManager::SetInfoTarget(TextureInfo* info, GLenum target) {
+ DCHECK(info);
+ info->SetTarget(target, MaxLevelsForTarget(target));
+}
+
void TextureManager::SetLevelInfo(
const FeatureInfo* feature_info,
TextureManager::TextureInfo* info,
@@ -526,5 +545,3 @@
} // namespace gles2
} // namespace gpu
-
-
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | net/base/directory_lister.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698