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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 | 922 |
923 enum TexFuncValidationSourceType { | 923 enum TexFuncValidationSourceType { |
924 SourceArrayBufferView, | 924 SourceArrayBufferView, |
925 SourceImageData, | 925 SourceImageData, |
926 SourceHTMLImageElement, | 926 SourceHTMLImageElement, |
927 SourceHTMLCanvasElement, | 927 SourceHTMLCanvasElement, |
928 SourceHTMLVideoElement, | 928 SourceHTMLVideoElement, |
929 SourceImageBitmap, | 929 SourceImageBitmap, |
930 }; | 930 }; |
931 | 931 |
932 // Helper function for tex{Sub}Image2D to check if the input format/type/lev
el/target/width/height/border/xoffset/yoffset are valid. | 932 // Helper function for tex{Sub}Image{2|3}D to check if the input format/type
/level/target/width/height/depth/border/xoffset/yoffset/zoffset are valid. |
933 // Otherwise, it would return quickly without doing other work. | 933 // Otherwise, it would return quickly without doing other work. |
934 bool validateTexFunc(const char* functionName, TexImageFunctionType, TexFunc
ValidationSourceType, GLenum target, GLint level, GLenum internalformat, GLsizei
width, | 934 bool validateTexFunc(const char* functionName, TexImageFunctionType, TexFunc
ValidationSourceType, GLenum target, GLint level, GLenum internalformat, GLsizei
width, |
935 GLsizei height, GLint border, GLenum format, GLenum type, GLint xoffset,
GLint yoffset); | 935 GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type,
GLint xoffset, GLint yoffset, GLint zoffset); |
936 | 936 |
937 // Helper function to check input width and height for functions {copy, comp
ressed}Tex{Sub}Image. | 937 // Helper function to check input width and height for functions {copy, comp
ressed}Tex{Sub}Image. |
938 // Generates GL error and returns false if width or height is invalid. | 938 // Generates GL error and returns false if width or height is invalid. |
939 bool validateTexFuncDimensions(const char* functionName, TexImageFunctionTyp
e, GLenum target, GLint level, GLsizei width, GLsizei height, GLsizei depth); | 939 bool validateTexFuncDimensions(const char* functionName, TexImageFunctionTyp
e, GLenum target, GLint level, GLsizei width, GLsizei height, GLsizei depth); |
940 | 940 |
941 // Helper function to check input parameters for functions {copy}Tex{Sub}Ima
ge. | 941 // Helper function to check input parameters for functions {copy}Tex{Sub}Ima
ge. |
942 // Generates GL error and returns false if parameters are invalid. | 942 // Generates GL error and returns false if parameters are invalid. |
943 bool validateTexFuncParameters(const char* functionName, TexImageFunctionTyp
e, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei hei
ght, GLsizei depth, GLint border, GLenum format, GLenum type); | 943 bool validateTexFuncParameters(const char* functionName, TexImageFunctionTyp
e, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei hei
ght, GLsizei depth, GLint border, GLenum format, GLenum type); |
944 | 944 |
945 enum NullDisposition { | 945 enum NullDisposition { |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 static WebGLRenderingContextBase* oldestEvictedContext(); | 1148 static WebGLRenderingContextBase* oldestEvictedContext(); |
1149 }; | 1149 }; |
1150 | 1150 |
1151 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1151 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
1152 | 1152 |
1153 } // namespace blink | 1153 } // namespace blink |
1154 | 1154 |
1155 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1155 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
1156 | 1156 |
1157 #endif // WebGLRenderingContextBase_h | 1157 #endif // WebGLRenderingContextBase_h |
OLD | NEW |