summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/texture_manager.cc
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-17 04:51:40 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-17 04:51:40 +0000
commit07d0cc8a31252167f8568b3103218aeefd2f8f03 (patch)
tree5a970ff9158373a14fa528354470b6d0f2bb2126 /gpu/command_buffer/service/texture_manager.cc
parent349a9a34325fbbb74031803f4e37e321fa621e0e (diff)
downloadchromium_src-07d0cc8a31252167f8568b3103218aeefd2f8f03.zip
chromium_src-07d0cc8a31252167f8568b3103218aeefd2f8f03.tar.gz
chromium_src-07d0cc8a31252167f8568b3103218aeefd2f8f03.tar.bz2
Updates many commands to require the client to set the
result->size to 0 or result->success to false before calling the command. TEST=none BUG=none Review URL: http://codereview.chromium.org/612006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/texture_manager.cc')
-rw-r--r--gpu/command_buffer/service/texture_manager.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 91b3462..1496f88 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -147,7 +147,7 @@ void TextureManager::TextureInfo::Update() {
}
}
- // Update texture_complete status.
+ // Update texture_complete and cube_complete status.
const TextureInfo::LevelInfo& first_face = level_infos_[0][0];
texture_complete_ =
(max_level_set_ == ComputeMipMapCount(first_face.width,
@@ -157,7 +157,7 @@ void TextureManager::TextureInfo::Update() {
cube_complete_ = (level_infos_.size() == 6) &&
(first_face.width == first_face.height);
for (size_t ii = 0;
- ii < level_infos_.size() && cube_complete_ && texture_complete_;
+ ii < level_infos_.size() && (cube_complete_ || texture_complete_);
++ii) {
const TextureInfo::LevelInfo& level0 = level_infos_[ii][0];
if (!level0.valid ||
@@ -173,7 +173,7 @@ void TextureManager::TextureInfo::Update() {
GLsizei width = level0.width;
GLsizei height = level0.height;
GLsizei depth = level0.depth;
- for (GLint jj = 0; jj <= max_level_set_; ++jj) {
+ for (GLint jj = 1; jj <= max_level_set_; ++jj) {
// compute required size for mip.
width = std::max(1, width >> 1);
height = std::max(1, height >> 1);