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

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

Issue 1099853002: WebGL: add targets for WebGL 2 when check FBO targets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed kbr@'s feedback: add a validation function to make it clear Created 5 years, 8 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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 // Helper function for texParameterf and texParameteri. 874 // Helper function for texParameterf and texParameteri.
875 void texParameter(GLenum target, GLenum pname, GLfloat paramf, GLint parami, bool isFloat); 875 void texParameter(GLenum target, GLenum pname, GLfloat paramf, GLint parami, bool isFloat);
876 876
877 // Helper function to print GL errors to console. 877 // Helper function to print GL errors to console.
878 void printGLErrorToConsole(const String&); 878 void printGLErrorToConsole(const String&);
879 879
880 // Helper function to print warnings to console. Currently 880 // Helper function to print warnings to console. Currently
881 // used only to warn about use of obsolete functions. 881 // used only to warn about use of obsolete functions.
882 void printWarningToConsole(const String&); 882 void printWarningToConsole(const String&);
883 883
884 // Helper function to validate the target for checkFramebufferStatus and val idateFramebufferFuncParameters.
885 virtual bool validateFramebufferTarget(GLenum target);
886
884 // Helper function to validate input parameters for framebuffer functions. 887 // Helper function to validate input parameters for framebuffer functions.
885 // Generate GL error if parameters are illegal. 888 // Generate GL error if parameters are illegal.
886 bool validateFramebufferFuncParameters(const char* functionName, GLenum targ et, GLenum attachment); 889 bool validateFramebufferFuncParameters(const char* functionName, GLenum targ et, GLenum attachment);
887 890
888 // Helper function to validate blend equation mode. 891 // Helper function to validate blend equation mode.
889 bool validateBlendEquation(const char* functionName, GLenum); 892 bool validateBlendEquation(const char* functionName, GLenum);
890 893
891 // Helper function to validate blend func factors. 894 // Helper function to validate blend func factors.
892 bool validateBlendFuncFactors(const char* functionName, GLenum src, GLenum d st); 895 bool validateBlendFuncFactors(const char* functionName, GLenum src, GLenum d st);
893 896
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 static IntSize oldestContextSize(); 1008 static IntSize oldestContextSize();
1006 }; 1009 };
1007 1010
1008 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1011 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1009 1012
1010 } // namespace blink 1013 } // namespace blink
1011 1014
1012 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 1015 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
1013 1016
1014 #endif // WebGLRenderingContextBase_h 1017 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698