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 <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 10037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10048 if (source_texture->target() == GL_TEXTURE_EXTERNAL_OES) { | 10048 if (source_texture->target() == GL_TEXTURE_EXTERNAL_OES) { |
10049 // TODO(hkuang): get the StreamTexture transform matrix in GPU process | 10049 // TODO(hkuang): get the StreamTexture transform matrix in GPU process |
10050 // instead of using default matrix crbug.com/226218. | 10050 // instead of using default matrix crbug.com/226218. |
10051 const static GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f, | 10051 const static GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f, |
10052 0.0f, 1.0f, 0.0f, 0.0f, | 10052 0.0f, 1.0f, 0.0f, 0.0f, |
10053 0.0f, 0.0f, 1.0f, 0.0f, | 10053 0.0f, 0.0f, 1.0f, 0.0f, |
10054 0.0f, 0.0f, 0.0f, 1.0f}; | 10054 0.0f, 0.0f, 0.0f, 1.0f}; |
10055 copy_texture_CHROMIUM_->DoCopyTextureWithTransform( | 10055 copy_texture_CHROMIUM_->DoCopyTextureWithTransform( |
10056 this, | 10056 this, |
10057 source_texture->target(), | 10057 source_texture->target(), |
10058 dest_texture->target(), | |
10059 source_texture->service_id(), | 10058 source_texture->service_id(), |
10060 dest_texture->service_id(), level, | 10059 dest_texture->service_id(), level, |
| 10060 internal_format, |
10061 source_width, source_height, | 10061 source_width, source_height, |
10062 unpack_flip_y_, | 10062 unpack_flip_y_, |
10063 unpack_premultiply_alpha_, | 10063 unpack_premultiply_alpha_, |
10064 unpack_unpremultiply_alpha_, | 10064 unpack_unpremultiply_alpha_, |
10065 default_matrix); | 10065 default_matrix); |
10066 } else { | 10066 } else { |
10067 copy_texture_CHROMIUM_->DoCopyTexture( | 10067 copy_texture_CHROMIUM_->DoCopyTexture( |
10068 this, | 10068 this, |
10069 source_texture->target(), | 10069 source_texture->target(), |
10070 dest_texture->target(), | |
10071 source_texture->service_id(), | 10070 source_texture->service_id(), |
10072 dest_texture->service_id(), level, | 10071 dest_texture->service_id(), level, |
| 10072 internal_format, |
10073 source_width, source_height, | 10073 source_width, source_height, |
10074 unpack_flip_y_, | 10074 unpack_flip_y_, |
10075 unpack_premultiply_alpha_, | 10075 unpack_premultiply_alpha_, |
10076 unpack_unpremultiply_alpha_); | 10076 unpack_unpremultiply_alpha_); |
10077 } | 10077 } |
10078 | 10078 |
10079 DoDidUseTexImageIfNeeded(source_texture, source_texture->target()); | 10079 DoDidUseTexImageIfNeeded(source_texture, source_texture->target()); |
10080 } | 10080 } |
10081 | 10081 |
10082 static GLenum ExtractTypeFromStorageFormat(GLenum internalformat) { | 10082 static GLenum ExtractTypeFromStorageFormat(GLenum internalformat) { |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10882 } | 10882 } |
10883 } | 10883 } |
10884 | 10884 |
10885 // Include the auto-generated part of this file. We split this because it means | 10885 // Include the auto-generated part of this file. We split this because it means |
10886 // we can easily edit the non-auto generated parts right here in this file | 10886 // we can easily edit the non-auto generated parts right here in this file |
10887 // instead of having to edit some template or the code generator. | 10887 // instead of having to edit some template or the code generator. |
10888 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10888 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
10889 | 10889 |
10890 } // namespace gles2 | 10890 } // namespace gles2 |
10891 } // namespace gpu | 10891 } // namespace gpu |
OLD | NEW |