| 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 14163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14174 } | 14174 } |
| 14175 } | 14175 } |
| 14176 } else { | 14176 } else { |
| 14177 GLenum final_internal_format = TextureManager::AdjustTexInternalFormat( | 14177 GLenum final_internal_format = TextureManager::AdjustTexInternalFormat( |
| 14178 feature_info_.get(), internal_format); | 14178 feature_info_.get(), internal_format); |
| 14179 if (workarounds().init_two_cube_map_levels_before_copyteximage && | 14179 if (workarounds().init_two_cube_map_levels_before_copyteximage && |
| 14180 texture->target() == GL_TEXTURE_CUBE_MAP && | 14180 texture->target() == GL_TEXTURE_CUBE_MAP && |
| 14181 target != GL_TEXTURE_CUBE_MAP_POSITIVE_X) { | 14181 target != GL_TEXTURE_CUBE_MAP_POSITIVE_X) { |
| 14182 for (int i = 0; i < 2; ++i) { | 14182 for (int i = 0; i < 2; ++i) { |
| 14183 TextureManager::DoTexImageArguments args = { | 14183 TextureManager::DoTexImageArguments args = { |
| 14184 target, i, final_internal_format, 1, 1, 1, border, | 14184 target, i, final_internal_format, width, height, 1, border, |
| 14185 format, type, nullptr, 1, 0, | 14185 format, type, nullptr, pixels_size, 0, |
| 14186 TextureManager::DoTexImageArguments::kTexImage2D }; | 14186 TextureManager::DoTexImageArguments::kTexImage2D }; |
| 14187 texture_manager()->WorkaroundCopyTexImageCubeMap(&texture_state_, | 14187 texture_manager()->WorkaroundCopyTexImageCubeMap(&texture_state_, |
| 14188 &state_, &framebuffer_state_, texture_ref, func_name, args); | 14188 &state_, &framebuffer_state_, texture_ref, func_name, args); |
| 14189 } | 14189 } |
| 14190 } | 14190 } |
| 14191 | 14191 |
| 14192 // The service id and target of the texture attached to READ_FRAMEBUFFER. | 14192 // The service id and target of the texture attached to READ_FRAMEBUFFER. |
| 14193 GLuint source_texture_service_id = 0; | 14193 GLuint source_texture_service_id = 0; |
| 14194 GLenum source_texture_target = 0; | 14194 GLenum source_texture_target = 0; |
| 14195 uint32_t channels_exist = GLES2Util::GetChannelsForFormat(read_format); | 14195 uint32_t channels_exist = GLES2Util::GetChannelsForFormat(read_format); |
| (...skipping 5050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19246 } | 19246 } |
| 19247 | 19247 |
| 19248 // Include the auto-generated part of this file. We split this because it means | 19248 // Include the auto-generated part of this file. We split this because it means |
| 19249 // we can easily edit the non-auto generated parts right here in this file | 19249 // we can easily edit the non-auto generated parts right here in this file |
| 19250 // instead of having to edit some template or the code generator. | 19250 // instead of having to edit some template or the code generator. |
| 19251 #include "base/macros.h" | 19251 #include "base/macros.h" |
| 19252 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 19252 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 19253 | 19253 |
| 19254 } // namespace gles2 | 19254 } // namespace gles2 |
| 19255 } // namespace gpu | 19255 } // namespace gpu |
| OLD | NEW |