Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 1304103005: Revert of gpu: support GL_TEXTURE_CUBE_MAP destination target to Copy(Sub)TextureCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // This file is here so other GLES2 related files can have a common set of 5 // This file is here so other GLES2 related files can have a common set of
6 // includes where appropriate. 6 // includes where appropriate.
7 7
8 #include <sstream> 8 #include <sstream>
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: 802 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
803 return 4; 803 return 4;
804 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: 804 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
805 return 5; 805 return 5;
806 default: 806 default:
807 NOTREACHED(); 807 NOTREACHED();
808 return 0; 808 return 0;
809 } 809 }
810 } 810 }
811 811
812 uint32_t GLES2Util::GLTextureTargetToBindingTarget(uint32_t textarget) {
813 switch (textarget) {
814 case GL_TEXTURE_2D:
815 case GL_TEXTURE_EXTERNAL_OES:
816 case GL_TEXTURE_RECTANGLE_ARB:
817 case GL_TEXTURE_3D:
818 case GL_TEXTURE_2D_ARRAY:
819 return textarget;
820 case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
821 case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
822 case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
823 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
824 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
825 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
826 return GL_TEXTURE_CUBE_MAP;
827 default:
828 NOTREACHED();
829 return GL_TEXTURE_2D;
830 }
831 }
832
833 uint32 GLES2Util::GetGLReadPixelsImplementationFormat( 812 uint32 GLES2Util::GetGLReadPixelsImplementationFormat(
834 uint32 internal_format) { 813 uint32 internal_format) {
835 switch (internal_format) { 814 switch (internal_format) {
836 case GL_R8: 815 case GL_R8:
837 case GL_R16F: 816 case GL_R16F:
838 case GL_R32F: 817 case GL_R32F:
839 return GL_RED; 818 return GL_RED;
840 case GL_R8UI: 819 case GL_R8UI:
841 case GL_R8I: 820 case GL_R8I:
842 case GL_R16UI: 821 case GL_R16UI:
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 } 1348 }
1370 1349
1371 return true; 1350 return true;
1372 } 1351 }
1373 1352
1374 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1353 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1375 1354
1376 } // namespace gles2 1355 } // namespace gles2
1377 } // namespace gpu 1356 } // namespace gpu
1378 1357
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698