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

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

Issue 2315773002: 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 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 } 2097 }
2098 return NULL; 2098 return NULL;
2099 } 2099 }
2100 2100
2101 GLsizei TextureManager::ComputeMipMapCount(GLenum target, 2101 GLsizei TextureManager::ComputeMipMapCount(GLenum target,
2102 GLsizei width, 2102 GLsizei width,
2103 GLsizei height, 2103 GLsizei height,
2104 GLsizei depth) { 2104 GLsizei depth) {
2105 switch (target) { 2105 switch (target) {
2106 case GL_TEXTURE_EXTERNAL_OES: 2106 case GL_TEXTURE_EXTERNAL_OES:
2107 case GL_TEXTURE_RECTANGLE_ARB:
2107 return 1; 2108 return 1;
2108 case GL_TEXTURE_3D: 2109 case GL_TEXTURE_3D:
2109 return 1 + 2110 return 1 +
2110 base::bits::Log2Floor(std::max(std::max(width, height), depth)); 2111 base::bits::Log2Floor(std::max(std::max(width, height), depth));
2111 default: 2112 default:
2112 return 1 + 2113 return 1 +
2113 base::bits::Log2Floor(std::max(width, height)); 2114 base::bits::Log2Floor(std::max(width, height));
2114 } 2115 }
2115 } 2116 }
2116 2117
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
3382 uint32_t TextureManager::GetServiceIdGeneration() const { 3383 uint32_t TextureManager::GetServiceIdGeneration() const {
3383 return current_service_id_generation_; 3384 return current_service_id_generation_;
3384 } 3385 }
3385 3386
3386 void TextureManager::IncrementServiceIdGeneration() { 3387 void TextureManager::IncrementServiceIdGeneration() {
3387 current_service_id_generation_++; 3388 current_service_id_generation_++;
3388 } 3389 }
3389 3390
3390 } // namespace gles2 3391 } // namespace gles2
3391 } // namespace gpu 3392 } // 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