OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 bool validateLocationLength(const char* functionName, const String&); | 812 bool validateLocationLength(const char* functionName, const String&); |
813 | 813 |
814 // Helper function to check if size is non-negative. | 814 // Helper function to check if size is non-negative. |
815 // Generate GL error and return false for negative inputs; otherwise, return
true. | 815 // Generate GL error and return false for negative inputs; otherwise, return
true. |
816 bool validateSize(const char* functionName, GLint x, GLint y, GLint z = 0); | 816 bool validateSize(const char* functionName, GLint x, GLint y, GLint z = 0); |
817 | 817 |
818 // Helper function to check if all characters in the string belong to the | 818 // Helper function to check if all characters in the string belong to the |
819 // ASCII subset as defined in GLSL ES 1.0 spec section 3.1. | 819 // ASCII subset as defined in GLSL ES 1.0 spec section 3.1. |
820 bool validateString(const char* functionName, const String&); | 820 bool validateString(const char* functionName, const String&); |
821 | 821 |
| 822 // Helper function to check if all characters in the shader source belong to
the ASCII |
| 823 // subset as defined in GLSL ES 1.0 spec section 3.1 Character Set for WebGL
1.0 and |
| 824 // in GLSL ES 3.00 spec section 3.1 Character Set for WebGL 2.0. |
| 825 bool validateShaderSource(const String&); |
| 826 |
822 // Helper function to check texture binding target and texture bound to the
target. | 827 // Helper function to check texture binding target and texture bound to the
target. |
823 // Generate GL errors and return 0 if target is invalid or texture bound is | 828 // Generate GL errors and return 0 if target is invalid or texture bound is |
824 // null. Otherwise, return the texture bound to the target. | 829 // null. Otherwise, return the texture bound to the target. |
825 WebGLTexture* validateTextureBinding(const char* functionName, GLenum target
); | 830 WebGLTexture* validateTextureBinding(const char* functionName, GLenum target
); |
826 | 831 |
827 // Wrapper function for validateTexture2D(3D)Binding, used in texImageHelper
functions. | 832 // Wrapper function for validateTexture2D(3D)Binding, used in texImageHelper
functions. |
828 virtual WebGLTexture* validateTexImageBinding(const char*, TexImageFunctionI
D, GLenum); | 833 virtual WebGLTexture* validateTexImageBinding(const char*, TexImageFunctionI
D, GLenum); |
829 | 834 |
830 // Helper function to check texture 2D target and texture bound to the targe
t. | 835 // Helper function to check texture 2D target and texture bound to the targe
t. |
831 // Generate GL errors and return 0 if target is invalid or texture bound is | 836 // Generate GL errors and return 0 if target is invalid or texture bound is |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 void texImageBitmapByGPU(ImageBitmap*, GLuint, GLenum, GLenum, GLint, bool); | 1113 void texImageBitmapByGPU(ImageBitmap*, GLuint, GLenum, GLenum, GLint, bool); |
1109 }; | 1114 }; |
1110 | 1115 |
1111 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1116 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
1112 | 1117 |
1113 } // namespace blink | 1118 } // namespace blink |
1114 | 1119 |
1115 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1120 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
1116 | 1121 |
1117 #endif // WebGLRenderingContextBase_h | 1122 #endif // WebGLRenderingContextBase_h |
OLD | NEW |