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