Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContextBase.h

Issue 974203002: update getTexParameter for WebGL 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed zmo@'s feedback Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G Lenum attachment, GLenum pname); 202 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G Lenum attachment, GLenum pname);
203 ScriptValue getParameter(ScriptState*, GLenum pname); 203 ScriptValue getParameter(ScriptState*, GLenum pname);
204 ScriptValue getProgramParameter(ScriptState*, WebGLProgram*, GLenum pname); 204 ScriptValue getProgramParameter(ScriptState*, WebGLProgram*, GLenum pname);
205 String getProgramInfoLog(WebGLProgram*); 205 String getProgramInfoLog(WebGLProgram*);
206 ScriptValue getRenderbufferParameter(ScriptState*, GLenum target, GLenum pna me); 206 ScriptValue getRenderbufferParameter(ScriptState*, GLenum target, GLenum pna me);
207 ScriptValue getShaderParameter(ScriptState*, WebGLShader*, GLenum pname); 207 ScriptValue getShaderParameter(ScriptState*, WebGLShader*, GLenum pname);
208 String getShaderInfoLog(WebGLShader*); 208 String getShaderInfoLog(WebGLShader*);
209 PassRefPtrWillBeRawPtr<WebGLShaderPrecisionFormat> getShaderPrecisionFormat( GLenum shaderType, GLenum precisionType); 209 PassRefPtrWillBeRawPtr<WebGLShaderPrecisionFormat> getShaderPrecisionFormat( GLenum shaderType, GLenum precisionType);
210 String getShaderSource(WebGLShader*); 210 String getShaderSource(WebGLShader*);
211 Nullable<Vector<String>> getSupportedExtensions(); 211 Nullable<Vector<String>> getSupportedExtensions();
212 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname); 212 virtual ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pnam e);
213 ScriptValue getUniform(ScriptState*, WebGLProgram*, const WebGLUniformLocati on*); 213 ScriptValue getUniform(ScriptState*, WebGLProgram*, const WebGLUniformLocati on*);
214 PassRefPtrWillBeRawPtr<WebGLUniformLocation> getUniformLocation(WebGLProgram *, const String&); 214 PassRefPtrWillBeRawPtr<WebGLUniformLocation> getUniformLocation(WebGLProgram *, const String&);
215 ScriptValue getVertexAttrib(ScriptState*, GLuint index, GLenum pname); 215 ScriptValue getVertexAttrib(ScriptState*, GLuint index, GLenum pname);
216 long long getVertexAttribOffset(GLuint index, GLenum pname); 216 long long getVertexAttribOffset(GLuint index, GLenum pname);
217 217
218 void hint(GLenum target, GLenum mode); 218 void hint(GLenum target, GLenum mode);
219 GLboolean isBuffer(WebGLBuffer*); 219 GLboolean isBuffer(WebGLBuffer*);
220 bool isContextLost() const; 220 bool isContextLost() const;
221 GLboolean isEnabled(GLenum cap); 221 GLboolean isEnabled(GLenum cap);
222 GLboolean isFramebuffer(WebGLFramebuffer*); 222 GLboolean isFramebuffer(WebGLFramebuffer*);
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 // Generate GL error and return false for negative inputs; otherwise, return true. 775 // Generate GL error and return false for negative inputs; otherwise, return true.
776 bool validateSize(const char* functionName, GLint x, GLint y); 776 bool validateSize(const char* functionName, GLint x, GLint y);
777 777
778 // Helper function to check if all characters in the string belong to the 778 // Helper function to check if all characters in the string belong to the
779 // ASCII subset as defined in GLSL ES 1.0 spec section 3.1. 779 // ASCII subset as defined in GLSL ES 1.0 spec section 3.1.
780 bool validateString(const char* functionName, const String&); 780 bool validateString(const char* functionName, const String&);
781 781
782 // Helper function to check target and texture bound to the target. 782 // Helper function to check target and texture bound to the target.
783 // Generate GL errors and return 0 if target is invalid or texture bound is 783 // Generate GL errors and return 0 if target is invalid or texture bound is
784 // null. Otherwise, return the texture bound to the target. 784 // null. Otherwise, return the texture bound to the target.
785 WebGLTexture* validateTextureBinding(const char* functionName, GLenum target , bool useSixEnumsForCubeMap); 785 virtual WebGLTexture* validateTextureBinding(const char* functionName, GLenu m target, bool useSixEnumsForCubeMap);
786 786
787 // Helper function to check input format/type for functions {copy}Tex{Sub}Im age. 787 // Helper function to check input format/type for functions {copy}Tex{Sub}Im age.
788 // Generates GL error and returns false if parameters are invalid. 788 // Generates GL error and returns false if parameters are invalid.
789 bool validateTexFuncFormatAndType(const char* functionName, GLenum format, G Lenum type, GLint level); 789 bool validateTexFuncFormatAndType(const char* functionName, GLenum format, G Lenum type, GLint level);
790 790
791 // Helper function to check input level for functions {copy}Tex{Sub}Image. 791 // Helper function to check input level for functions {copy}Tex{Sub}Image.
792 // Generates GL error and returns false if level is invalid. 792 // Generates GL error and returns false if level is invalid.
793 bool validateTexFuncLevel(const char* functionName, GLenum target, GLint lev el); 793 bool validateTexFuncLevel(const char* functionName, GLenum target, GLint lev el);
794 794
795 // Helper function to check if a 64-bit value is non-negative and can fit in to a 32-bit integer. 795 // Helper function to check if a 64-bit value is non-negative and can fit in to a 32-bit integer.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 static IntSize oldestContextSize(); 987 static IntSize oldestContextSize();
988 }; 988 };
989 989
990 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 990 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
991 991
992 } // namespace blink 992 } // namespace blink
993 993
994 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 994 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
995 995
996 #endif // WebGLRenderingContextBase_h 996 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698