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

Side by Side Diff: gpu/command_buffer/service/texture_manager.cc

Issue 2325493002: Correctly limit glTexStorage*(GL_TEXTURE_RECTANGLE_ARB, ...) to 1 mip level (Closed)
Patch Set: Created 4 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/texture_manager.h" 5 #include "gpu/command_buffer/service/texture_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 } 2094 }
2095 return NULL; 2095 return NULL;
2096 } 2096 }
2097 2097
2098 GLsizei TextureManager::ComputeMipMapCount(GLenum target, 2098 GLsizei TextureManager::ComputeMipMapCount(GLenum target,
2099 GLsizei width, 2099 GLsizei width,
2100 GLsizei height, 2100 GLsizei height,
2101 GLsizei depth) { 2101 GLsizei depth) {
2102 switch (target) { 2102 switch (target) {
2103 case GL_TEXTURE_EXTERNAL_OES: 2103 case GL_TEXTURE_EXTERNAL_OES:
2104 case GL_TEXTURE_RECTANGLE_ARB:
2104 return 1; 2105 return 1;
2105 case GL_TEXTURE_3D: 2106 case GL_TEXTURE_3D:
2106 return 1 + 2107 return 1 +
2107 base::bits::Log2Floor(std::max(std::max(width, height), depth)); 2108 base::bits::Log2Floor(std::max(std::max(width, height), depth));
2108 default: 2109 default:
2109 return 1 + 2110 return 1 +
2110 base::bits::Log2Floor(std::max(width, height)); 2111 base::bits::Log2Floor(std::max(width, height));
2111 } 2112 }
2112 } 2113 }
2113 2114
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 uint32_t TextureManager::GetServiceIdGeneration() const { 3380 uint32_t TextureManager::GetServiceIdGeneration() const {
3380 return current_service_id_generation_; 3381 return current_service_id_generation_;
3381 } 3382 }
3382 3383
3383 void TextureManager::IncrementServiceIdGeneration() { 3384 void TextureManager::IncrementServiceIdGeneration() {
3384 current_service_id_generation_++; 3385 current_service_id_generation_++;
3385 } 3386 }
3386 3387
3387 } // namespace gles2 3388 } // namespace gles2
3388 } // namespace gpu 3389 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698