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 16407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
16418 bool flip_y, | 16418 bool flip_y, |
16419 bool premultiply_alpha, | 16419 bool premultiply_alpha, |
16420 bool unpremultiply_alpha) { | 16420 bool unpremultiply_alpha) { |
16421 bool premultiply_alpha_change = premultiply_alpha ^ unpremultiply_alpha; | 16421 bool premultiply_alpha_change = premultiply_alpha ^ unpremultiply_alpha; |
16422 bool source_format_color_renderable = | 16422 bool source_format_color_renderable = |
16423 Texture::ColorRenderable(GetFeatureInfo(), source_internal_format, false); | 16423 Texture::ColorRenderable(GetFeatureInfo(), source_internal_format, false); |
16424 bool dest_format_color_renderable = | 16424 bool dest_format_color_renderable = |
16425 Texture::ColorRenderable(GetFeatureInfo(), dest_internal_format, false); | 16425 Texture::ColorRenderable(GetFeatureInfo(), dest_internal_format, false); |
16426 std::string output_error_msg; | 16426 std::string output_error_msg; |
16427 | 16427 |
16428 // Make sure source_type has value for unsized source internalformat. | |
16429 if (!GLES2Util::IsSizedColorFormat(source_internal_format) && !source_type) { | |
16430 source_type = | |
16431 TextureManager::ExtractTypeFromStorageFormat(source_internal_format); | |
16432 } | |
qiankun
2017/03/09 08:53:02
This code can be removed once the issue in https:/
Zhenyao Mo
2017/03/10 00:10:23
Can you add it into a TODO in the code? Otherwise
qiankun
2017/03/10 02:48:04
Done.
| |
16433 DCHECK(GLES2Util::IsSizedColorFormat(source_internal_format) || source_type); | |
16434 | |
16428 // CopyTexImage* should not allow internalformat of GL_BGRA_EXT and | 16435 // CopyTexImage* should not allow internalformat of GL_BGRA_EXT and |
16429 // GL_BGRA8_EXT. crbug.com/663086. | 16436 // GL_BGRA8_EXT. crbug.com/663086. |
16430 bool copy_tex_image_format_valid = | 16437 bool copy_tex_image_format_valid = |
16431 source_internal_format != GL_BGRA_EXT && | 16438 source_internal_format != GL_BGRA_EXT && |
16432 dest_internal_format != GL_BGRA_EXT && | 16439 dest_internal_format != GL_BGRA_EXT && |
16433 source_internal_format != GL_BGRA8_EXT && | 16440 source_internal_format != GL_BGRA8_EXT && |
16434 dest_internal_format != GL_BGRA8_EXT && | 16441 dest_internal_format != GL_BGRA8_EXT && |
16435 ValidateCopyTexFormatHelper(dest_internal_format, source_internal_format, | 16442 ValidateCopyTexFormatHelper(dest_internal_format, source_internal_format, |
16436 source_type, &output_error_msg); | 16443 source_type, &output_error_msg); |
16437 | 16444 |
(...skipping 2917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
19355 } | 19362 } |
19356 | 19363 |
19357 // Include the auto-generated part of this file. We split this because it means | 19364 // Include the auto-generated part of this file. We split this because it means |
19358 // we can easily edit the non-auto generated parts right here in this file | 19365 // we can easily edit the non-auto generated parts right here in this file |
19359 // instead of having to edit some template or the code generator. | 19366 // instead of having to edit some template or the code generator. |
19360 #include "base/macros.h" | 19367 #include "base/macros.h" |
19361 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 19368 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
19362 | 19369 |
19363 } // namespace gles2 | 19370 } // namespace gles2 |
19364 } // namespace gpu | 19371 } // namespace gpu |
OLD | NEW |