| 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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 virtual DOMArrayBufferView::ViewType readPixelsExpectedArrayBufferViewType(G
Lenum type); | 900 virtual DOMArrayBufferView::ViewType readPixelsExpectedArrayBufferViewType(G
Lenum type); |
| 901 | 901 |
| 902 // Helper function to check format/type combination for readPixels. | 902 // Helper function to check format/type combination for readPixels. |
| 903 // Generates INVALID_OPERATION and returns false if the combination is unsup
ported. | 903 // Generates INVALID_OPERATION and returns false if the combination is unsup
ported. |
| 904 bool validateReadPixelsFormatTypeCombination(GLenum format, GLenum type, GLe
num readBufferInternalFormat, GLenum readBufferType); | 904 bool validateReadPixelsFormatTypeCombination(GLenum format, GLenum type, GLe
num readBufferInternalFormat, GLenum readBufferType); |
| 905 | 905 |
| 906 // Helper function to check parameters of readPixels. Returns true if all pa
rameters | 906 // Helper function to check parameters of readPixels. Returns true if all pa
rameters |
| 907 // are valid. Otherwise, generates appropriate error and returns false. | 907 // are valid. Otherwise, generates appropriate error and returns false. |
| 908 bool validateReadPixelsFuncParameters(GLsizei width, GLsizei height, GLenum
format, GLenum type, long long bufferSize); | 908 bool validateReadPixelsFuncParameters(GLsizei width, GLsizei height, GLenum
format, GLenum type, long long bufferSize); |
| 909 | 909 |
| 910 // Helper function to check type and size of vertexAttribPointer. Return tru
e if type and size are valid. Otherwise, generates appropriates error and return
false. | |
| 911 virtual bool validateVertexAttribPointerTypeAndSize(GLenum type, GLint size)
; | |
| 912 | |
| 913 virtual GLint getMaxTextureLevelForTarget(GLenum target); | 910 virtual GLint getMaxTextureLevelForTarget(GLenum target); |
| 914 | 911 |
| 915 // Helper function to check input level for functions {copy}Tex{Sub}Image. | 912 // Helper function to check input level for functions {copy}Tex{Sub}Image. |
| 916 // Generates GL error and returns false if level is invalid. | 913 // Generates GL error and returns false if level is invalid. |
| 917 bool validateTexFuncLevel(const char* functionName, GLenum target, GLint lev
el); | 914 bool validateTexFuncLevel(const char* functionName, GLenum target, GLint lev
el); |
| 918 | 915 |
| 919 // Helper function to check if a 64-bit value is non-negative and can fit in
to a 32-bit integer. | 916 // Helper function to check if a 64-bit value is non-negative and can fit in
to a 32-bit integer. |
| 920 // Generates GL error and returns false if not. | 917 // Generates GL error and returns false if not. |
| 921 bool validateValueFitNonNegInt32(const char* functionName, const char* param
Name, long long value); | 918 bool validateValueFitNonNegInt32(const char* functionName, const char* param
Name, long long value); |
| 922 | 919 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 static WebGLRenderingContextBase* oldestEvictedContext(); | 1145 static WebGLRenderingContextBase* oldestEvictedContext(); |
| 1149 }; | 1146 }; |
| 1150 | 1147 |
| 1151 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1148 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
| 1152 | 1149 |
| 1153 } // namespace blink | 1150 } // namespace blink |
| 1154 | 1151 |
| 1155 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1152 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
| 1156 | 1153 |
| 1157 #endif // WebGLRenderingContextBase_h | 1154 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |