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 9930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9941 if (GL_TEXTURE_2D != target) { | 9941 if (GL_TEXTURE_2D != target) { |
9942 LOCAL_SET_GL_ERROR( | 9942 LOCAL_SET_GL_ERROR( |
9943 GL_INVALID_VALUE, "glCopyTextureCHROMIUM", "invalid texture target"); | 9943 GL_INVALID_VALUE, "glCopyTextureCHROMIUM", "invalid texture target"); |
9944 return; | 9944 return; |
9945 } | 9945 } |
9946 | 9946 |
9947 Texture* source_texture = source_texture_ref->texture(); | 9947 Texture* source_texture = source_texture_ref->texture(); |
9948 Texture* dest_texture = dest_texture_ref->texture(); | 9948 Texture* dest_texture = dest_texture_ref->texture(); |
9949 if (dest_texture->target() != GL_TEXTURE_2D || | 9949 if (dest_texture->target() != GL_TEXTURE_2D || |
9950 (source_texture->target() != GL_TEXTURE_2D && | 9950 (source_texture->target() != GL_TEXTURE_2D && |
9951 source_texture->target() != GL_TEXTURE_EXTERNAL_OES)) { | 9951 source_texture->target() != GL_TEXTURE_RECTANGLE_ARB && |
| 9952 source_texture->target() != GL_TEXTURE_EXTERNAL_OES)) { |
9952 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, | 9953 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, |
9953 "glCopyTextureCHROMIUM", | 9954 "glCopyTextureCHROMIUM", |
9954 "invalid texture target binding"); | 9955 "invalid texture target binding"); |
9955 return; | 9956 return; |
9956 } | 9957 } |
9957 | 9958 |
9958 int source_width, source_height, dest_width, dest_height; | 9959 int source_width, source_height, dest_width, dest_height; |
9959 | 9960 |
9960 gfx::GLImage* image = | 9961 gfx::GLImage* image = |
9961 source_texture->GetLevelImage(source_texture->target(), 0); | 9962 source_texture->GetLevelImage(source_texture->target(), 0); |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10795 } | 10796 } |
10796 } | 10797 } |
10797 | 10798 |
10798 // Include the auto-generated part of this file. We split this because it means | 10799 // Include the auto-generated part of this file. We split this because it means |
10799 // we can easily edit the non-auto generated parts right here in this file | 10800 // we can easily edit the non-auto generated parts right here in this file |
10800 // instead of having to edit some template or the code generator. | 10801 // instead of having to edit some template or the code generator. |
10801 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10802 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
10802 | 10803 |
10803 } // namespace gles2 | 10804 } // namespace gles2 |
10804 } // namespace gpu | 10805 } // namespace gpu |
OLD | NEW |