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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 PassRefPtrWillBeRawPtr<WebGLBuffer> createBuffer(); | 158 PassRefPtrWillBeRawPtr<WebGLBuffer> createBuffer(); |
159 PassRefPtrWillBeRawPtr<WebGLFramebuffer> createFramebuffer(); | 159 PassRefPtrWillBeRawPtr<WebGLFramebuffer> createFramebuffer(); |
160 PassRefPtrWillBeRawPtr<WebGLProgram> createProgram(); | 160 PassRefPtrWillBeRawPtr<WebGLProgram> createProgram(); |
161 PassRefPtrWillBeRawPtr<WebGLRenderbuffer> createRenderbuffer(); | 161 PassRefPtrWillBeRawPtr<WebGLRenderbuffer> createRenderbuffer(); |
162 PassRefPtrWillBeRawPtr<WebGLShader> createShader(GLenum type); | 162 PassRefPtrWillBeRawPtr<WebGLShader> createShader(GLenum type); |
163 PassRefPtrWillBeRawPtr<WebGLTexture> createTexture(); | 163 PassRefPtrWillBeRawPtr<WebGLTexture> createTexture(); |
164 | 164 |
165 void cullFace(GLenum mode); | 165 void cullFace(GLenum mode); |
166 | 166 |
167 void deleteBuffer(WebGLBuffer*); | 167 void deleteBuffer(WebGLBuffer*); |
168 void deleteFramebuffer(WebGLFramebuffer*); | 168 virtual void deleteFramebuffer(WebGLFramebuffer*); |
169 void deleteProgram(WebGLProgram*); | 169 void deleteProgram(WebGLProgram*); |
170 void deleteRenderbuffer(WebGLRenderbuffer*); | 170 void deleteRenderbuffer(WebGLRenderbuffer*); |
171 void deleteShader(WebGLShader*); | 171 void deleteShader(WebGLShader*); |
172 void deleteTexture(WebGLTexture*); | 172 void deleteTexture(WebGLTexture*); |
173 | 173 |
174 void depthFunc(GLenum); | 174 void depthFunc(GLenum); |
175 void depthMask(GLboolean); | 175 void depthMask(GLboolean); |
176 void depthRange(GLfloat zNear, GLfloat zFar); | 176 void depthRange(GLfloat zNear, GLfloat zFar); |
177 void detachShader(WebGLProgram*, WebGLShader*); | 177 void detachShader(WebGLProgram*, WebGLShader*); |
178 void disable(GLenum cap); | 178 void disable(GLenum cap); |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 | 769 |
770 void handleTextureCompleteness(const char*, bool); | 770 void handleTextureCompleteness(const char*, bool); |
771 void createFallbackBlackTextures1x1(); | 771 void createFallbackBlackTextures1x1(); |
772 | 772 |
773 // Helper function for copyTex{Sub}Image, check whether the internalformat | 773 // Helper function for copyTex{Sub}Image, check whether the internalformat |
774 // and the color buffer format of the current bound framebuffer combination | 774 // and the color buffer format of the current bound framebuffer combination |
775 // is valid. | 775 // is valid. |
776 bool isTexInternalFormatColorBufferCombinationValid(GLenum texInternalFormat
, GLenum colorBufferFormat); | 776 bool isTexInternalFormatColorBufferCombinationValid(GLenum texInternalFormat
, GLenum colorBufferFormat); |
777 | 777 |
778 // Helper function to get the bound framebuffer's color buffer format. | 778 // Helper function to get the bound framebuffer's color buffer format. |
779 GLenum boundFramebufferColorFormat(); | 779 virtual GLenum boundFramebufferColorFormat(); |
780 | 780 |
781 // Helper function to verify limits on the length of uniform and attribute l
ocations. | 781 // Helper function to verify limits on the length of uniform and attribute l
ocations. |
782 bool validateLocationLength(const char* functionName, const String&); | 782 bool validateLocationLength(const char* functionName, const String&); |
783 | 783 |
784 // Helper function to check if size is non-negative. | 784 // Helper function to check if size is non-negative. |
785 // Generate GL error and return false for negative inputs; otherwise, return
true. | 785 // Generate GL error and return false for negative inputs; otherwise, return
true. |
786 bool validateSize(const char* functionName, GLint x, GLint y); | 786 bool validateSize(const char* functionName, GLint x, GLint y); |
787 | 787 |
788 // Helper function to check if all characters in the string belong to the | 788 // Helper function to check if all characters in the string belong to the |
789 // ASCII subset as defined in GLSL ES 1.0 spec section 3.1. | 789 // ASCII subset as defined in GLSL ES 1.0 spec section 3.1. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 IntSize clampedCanvasSize(); | 981 IntSize clampedCanvasSize(); |
982 | 982 |
983 // First time called, if EXT_draw_buffers is supported, query the value; oth
erwise return 0. | 983 // First time called, if EXT_draw_buffers is supported, query the value; oth
erwise return 0. |
984 // Later, return the cached value. | 984 // Later, return the cached value. |
985 GLint maxDrawBuffers(); | 985 GLint maxDrawBuffers(); |
986 GLint maxColorAttachments(); | 986 GLint maxColorAttachments(); |
987 | 987 |
988 void setBackDrawBuffer(GLenum); | 988 void setBackDrawBuffer(GLenum); |
989 void setFramebuffer(GLenum, WebGLFramebuffer*); | 989 void setFramebuffer(GLenum, WebGLFramebuffer*); |
990 | 990 |
991 void restoreCurrentFramebuffer(); | 991 virtual void restoreCurrentFramebuffer(); |
992 void restoreCurrentTexture2D(); | 992 void restoreCurrentTexture2D(); |
993 | 993 |
994 virtual void multisamplingChanged(bool) override; | 994 virtual void multisamplingChanged(bool) override; |
995 | 995 |
996 void findNewMaxNonDefaultTextureUnit(); | 996 void findNewMaxNonDefaultTextureUnit(); |
997 | 997 |
998 virtual void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum
internalformat, GLsizei width, GLsizei height, const char* functionName); | 998 virtual void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum
internalformat, GLsizei width, GLsizei height, const char* functionName); |
999 | 999 |
1000 friend class WebGLStateRestorer; | 1000 friend class WebGLStateRestorer; |
1001 friend class WebGLRenderingContextEvictionManager; | 1001 friend class WebGLRenderingContextEvictionManager; |
(...skipping 13 matching lines...) Expand all Loading... |
1015 static IntSize oldestContextSize(); | 1015 static IntSize oldestContextSize(); |
1016 }; | 1016 }; |
1017 | 1017 |
1018 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1018 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
1019 | 1019 |
1020 } // namespace blink | 1020 } // namespace blink |
1021 | 1021 |
1022 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1022 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
1023 | 1023 |
1024 #endif // WebGLRenderingContextBase_h | 1024 #endif // WebGLRenderingContextBase_h |
OLD | NEW |