| OLD | NEW |
| 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/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 16773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16784 if (workarounds().reset_base_mipmap_level_before_texstorage && | 16784 if (workarounds().reset_base_mipmap_level_before_texstorage && |
| 16785 texture->base_level() > 0) | 16785 texture->base_level() > 0) |
| 16786 glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, texture->base_level()); | 16786 glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, texture->base_level()); |
| 16787 | 16787 |
| 16788 { | 16788 { |
| 16789 GLsizei level_width = width; | 16789 GLsizei level_width = width; |
| 16790 GLsizei level_height = height; | 16790 GLsizei level_height = height; |
| 16791 GLsizei level_depth = depth; | 16791 GLsizei level_depth = depth; |
| 16792 | 16792 |
| 16793 GLenum adjusted_internal_format = | 16793 GLenum adjusted_internal_format = |
| 16794 feature_info_->context_type() == CONTEXT_TYPE_OPENGLES2 ? | 16794 feature_info_->IsWebGL1OrES2Context() ? format : internal_format; |
| 16795 format : internal_format; | |
| 16796 for (int ii = 0; ii < levels; ++ii) { | 16795 for (int ii = 0; ii < levels; ++ii) { |
| 16797 if (target == GL_TEXTURE_CUBE_MAP) { | 16796 if (target == GL_TEXTURE_CUBE_MAP) { |
| 16798 for (int jj = 0; jj < 6; ++jj) { | 16797 for (int jj = 0; jj < 6; ++jj) { |
| 16799 GLenum face = GL_TEXTURE_CUBE_MAP_POSITIVE_X + jj; | 16798 GLenum face = GL_TEXTURE_CUBE_MAP_POSITIVE_X + jj; |
| 16800 texture_manager()->SetLevelInfo( | 16799 texture_manager()->SetLevelInfo( |
| 16801 texture_ref, face, ii, adjusted_internal_format, level_width, | 16800 texture_ref, face, ii, adjusted_internal_format, level_width, |
| 16802 level_height, 1, 0, format, type, gfx::Rect()); | 16801 level_height, 1, 0, format, type, gfx::Rect()); |
| 16803 } | 16802 } |
| 16804 } else { | 16803 } else { |
| 16805 texture_manager()->SetLevelInfo( | 16804 texture_manager()->SetLevelInfo( |
| (...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18915 } | 18914 } |
| 18916 | 18915 |
| 18917 // Include the auto-generated part of this file. We split this because it means | 18916 // Include the auto-generated part of this file. We split this because it means |
| 18918 // we can easily edit the non-auto generated parts right here in this file | 18917 // we can easily edit the non-auto generated parts right here in this file |
| 18919 // instead of having to edit some template or the code generator. | 18918 // instead of having to edit some template or the code generator. |
| 18920 #include "base/macros.h" | 18919 #include "base/macros.h" |
| 18921 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 18920 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 18922 | 18921 |
| 18923 } // namespace gles2 | 18922 } // namespace gles2 |
| 18924 } // namespace gpu | 18923 } // namespace gpu |
| OLD | NEW |