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

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: get the 'correct' framebuffer bound to give target Created 5 years, 7 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
887 // Get the framebuffer bound to given target
888 virtual RefPtrWillBeMember<WebGLFramebuffer> getFramebufferBinding(GLenum ta rget);
Ken Russell (switch to Gerrit) 2015/04/30 01:41:51 I don't think it's necessary or correct to return
yunchao 2015/04/30 02:42:49 Done.
889
884 // Helper function to validate input parameters for framebuffer functions. 890 // Helper function to validate input parameters for framebuffer functions.
885 // Generate GL error if parameters are illegal. 891 // Generate GL error if parameters are illegal.
886 bool validateFramebufferFuncParameters(const char* functionName, GLenum targ et, GLenum attachment); 892 bool validateFramebufferFuncParameters(const char* functionName, GLenum targ et, GLenum attachment);
887 893
888 // Helper function to validate blend equation mode. 894 // Helper function to validate blend equation mode.
889 bool validateBlendEquation(const char* functionName, GLenum); 895 bool validateBlendEquation(const char* functionName, GLenum);
890 896
891 // Helper function to validate blend func factors. 897 // Helper function to validate blend func factors.
892 bool validateBlendFuncFactors(const char* functionName, GLenum src, GLenum d st); 898 bool validateBlendFuncFactors(const char* functionName, GLenum src, GLenum d st);
893 899
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 static IntSize oldestContextSize(); 1011 static IntSize oldestContextSize();
1006 }; 1012 };
1007 1013
1008 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1014 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1009 1015
1010 } // namespace blink 1016 } // namespace blink
1011 1017
1012 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);
1013 1019
1014 #endif // WebGLRenderingContextBase_h 1020 #endif // WebGLRenderingContextBase_h
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGL2RenderingContextBase.cpp ('k') | Source/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698