| 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 10071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10082 if (source_texture->target() == GL_TEXTURE_EXTERNAL_OES) { | 10082 if (source_texture->target() == GL_TEXTURE_EXTERNAL_OES) { |
| 10083 // TODO(hkuang): get the StreamTexture transform matrix in GPU process | 10083 // TODO(hkuang): get the StreamTexture transform matrix in GPU process |
| 10084 // instead of using default matrix crbug.com/226218. | 10084 // instead of using default matrix crbug.com/226218. |
| 10085 const static GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f, | 10085 const static GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f, |
| 10086 0.0f, 1.0f, 0.0f, 0.0f, | 10086 0.0f, 1.0f, 0.0f, 0.0f, |
| 10087 0.0f, 0.0f, 1.0f, 0.0f, | 10087 0.0f, 0.0f, 1.0f, 0.0f, |
| 10088 0.0f, 0.0f, 0.0f, 1.0f}; | 10088 0.0f, 0.0f, 0.0f, 1.0f}; |
| 10089 copy_texture_CHROMIUM_->DoCopyTextureWithTransform( | 10089 copy_texture_CHROMIUM_->DoCopyTextureWithTransform( |
| 10090 this, | 10090 this, |
| 10091 source_texture->target(), | 10091 source_texture->target(), |
| 10092 dest_texture->target(), | |
| 10093 source_texture->service_id(), | 10092 source_texture->service_id(), |
| 10094 dest_texture->service_id(), level, | 10093 dest_texture->service_id(), level, |
| 10094 internal_format, |
| 10095 source_width, source_height, | 10095 source_width, source_height, |
| 10096 unpack_flip_y_, | 10096 unpack_flip_y_, |
| 10097 unpack_premultiply_alpha_, | 10097 unpack_premultiply_alpha_, |
| 10098 unpack_unpremultiply_alpha_, | 10098 unpack_unpremultiply_alpha_, |
| 10099 default_matrix); | 10099 default_matrix); |
| 10100 } else { | 10100 } else { |
| 10101 copy_texture_CHROMIUM_->DoCopyTexture( | 10101 copy_texture_CHROMIUM_->DoCopyTexture( |
| 10102 this, | 10102 this, |
| 10103 source_texture->target(), | 10103 source_texture->target(), |
| 10104 dest_texture->target(), | |
| 10105 source_texture->service_id(), | 10104 source_texture->service_id(), |
| 10106 dest_texture->service_id(), level, | 10105 dest_texture->service_id(), level, |
| 10106 internal_format, |
| 10107 source_width, source_height, | 10107 source_width, source_height, |
| 10108 unpack_flip_y_, | 10108 unpack_flip_y_, |
| 10109 unpack_premultiply_alpha_, | 10109 unpack_premultiply_alpha_, |
| 10110 unpack_unpremultiply_alpha_); | 10110 unpack_unpremultiply_alpha_); |
| 10111 } | 10111 } |
| 10112 | 10112 |
| 10113 DoDidUseTexImageIfNeeded(source_texture, source_texture->target()); | 10113 DoDidUseTexImageIfNeeded(source_texture, source_texture->target()); |
| 10114 } | 10114 } |
| 10115 | 10115 |
| 10116 static GLenum ExtractTypeFromStorageFormat(GLenum internalformat) { | 10116 static GLenum ExtractTypeFromStorageFormat(GLenum internalformat) { |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10916 } | 10916 } |
| 10917 } | 10917 } |
| 10918 | 10918 |
| 10919 // Include the auto-generated part of this file. We split this because it means | 10919 // Include the auto-generated part of this file. We split this because it means |
| 10920 // we can easily edit the non-auto generated parts right here in this file | 10920 // we can easily edit the non-auto generated parts right here in this file |
| 10921 // instead of having to edit some template or the code generator. | 10921 // instead of having to edit some template or the code generator. |
| 10922 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10922 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 10923 | 10923 |
| 10924 } // namespace gles2 | 10924 } // namespace gles2 |
| 10925 } // namespace gpu | 10925 } // namespace gpu |
| OLD | NEW |