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 // TODO(qiankun.miao@intel.com): remove this hacking once the issue in |
| 16429 // https://codereview.chromium.org/2711903002/ is fixed. |
| 16430 // Make sure source_type has value for unsized source internalformat. |
| 16431 if (!GLES2Util::IsSizedColorFormat(source_internal_format) && !source_type) { |
| 16432 source_type = |
| 16433 TextureManager::ExtractTypeFromStorageFormat(source_internal_format); |
| 16434 } |
| 16435 DCHECK(GLES2Util::IsSizedColorFormat(source_internal_format) || source_type); |
| 16436 |
16428 // CopyTexImage* should not allow internalformat of GL_BGRA_EXT and | 16437 // CopyTexImage* should not allow internalformat of GL_BGRA_EXT and |
16429 // GL_BGRA8_EXT. crbug.com/663086. | 16438 // GL_BGRA8_EXT. crbug.com/663086. |
16430 bool copy_tex_image_format_valid = | 16439 bool copy_tex_image_format_valid = |
16431 source_internal_format != GL_BGRA_EXT && | 16440 source_internal_format != GL_BGRA_EXT && |
16432 dest_internal_format != GL_BGRA_EXT && | 16441 dest_internal_format != GL_BGRA_EXT && |
16433 source_internal_format != GL_BGRA8_EXT && | 16442 source_internal_format != GL_BGRA8_EXT && |
16434 dest_internal_format != GL_BGRA8_EXT && | 16443 dest_internal_format != GL_BGRA8_EXT && |
16435 ValidateCopyTexFormatHelper(dest_internal_format, source_internal_format, | 16444 ValidateCopyTexFormatHelper(dest_internal_format, source_internal_format, |
16436 source_type, &output_error_msg); | 16445 source_type, &output_error_msg); |
16437 | 16446 |
(...skipping 2917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19355 } | 19364 } |
19356 | 19365 |
19357 // Include the auto-generated part of this file. We split this because it means | 19366 // 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 | 19367 // 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. | 19368 // instead of having to edit some template or the code generator. |
19360 #include "base/macros.h" | 19369 #include "base/macros.h" |
19361 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 19370 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
19362 | 19371 |
19363 } // namespace gles2 | 19372 } // namespace gles2 |
19364 } // namespace gpu | 19373 } // namespace gpu |
OLD | NEW |