Remove glBlendEquation and glColorPointer
Review URL: http://codereview.appspot.com/6300075/ git-svn-id: http://skia.googlecode.com/svn/trunk@4216 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
94e75ee46a
commit
0efcc37952
@ -52,7 +52,6 @@ extern "C" {
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBlendColorProc)(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBindFragDataLocationProc)(GrGLuint program, GrGLuint colorNumber, const GrGLchar* name);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBindFragDataLocationIndexedProc)(GrGLuint program, GrGLuint colorNumber, GrGLuint index, const GrGLchar * name);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBlendEquationProc)(GrGLenum mode);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBlendFuncProc)(GrGLenum sfactor, GrGLenum dfactor);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBlitFramebufferProc)(GrGLint srcX0, GrGLint srcY0, GrGLint srcX1, GrGLint srcY1, GrGLint dstX0, GrGLint dstY0, GrGLint dstX1, GrGLint dstY1, GrGLbitfield mask, GrGLenum filter);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBufferDataProc)(GrGLenum target, GrGLsizeiptr size, const GrGLvoid* data, GrGLenum usage);
|
||||
@ -62,7 +61,6 @@ extern "C" {
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLClearColorProc)(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLClearStencilProc)(GrGLint s);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLColorMaskProc)(GrGLboolean red, GrGLboolean green, GrGLboolean blue, GrGLboolean alpha);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLColorPointerProc)(GrGLint size, GrGLenum type, GrGLsizei stride, const GrGLvoid* pointer);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLCompileShaderProc)(GrGLuint shader);
|
||||
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLCompressedTexImage2DProc)(GrGLenum target, GrGLint level, GrGLenum internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLsizei imageSize, const GrGLvoid* data);
|
||||
typedef GrGLuint (GR_GL_FUNCTION_TYPE* GrGLCreateProgramProc)(void);
|
||||
|
@ -144,7 +144,6 @@ public:
|
||||
GLPtr<GrGLBindTextureProc> fBindTexture;
|
||||
GLPtr<GrGLBlendColorProc> fBlendColor;
|
||||
GLPtr<GrGLBlendFuncProc> fBlendFunc;
|
||||
GLPtr<GrGLBlendEquationProc> fBlendEquation;
|
||||
GLPtr<GrGLBlitFramebufferProc> fBlitFramebuffer;
|
||||
GLPtr<GrGLBufferDataProc> fBufferData;
|
||||
GLPtr<GrGLBufferSubDataProc> fBufferSubData;
|
||||
@ -153,7 +152,6 @@ public:
|
||||
GLPtr<GrGLClearColorProc> fClearColor;
|
||||
GLPtr<GrGLClearStencilProc> fClearStencil;
|
||||
GLPtr<GrGLColorMaskProc> fColorMask;
|
||||
GLPtr<GrGLColorPointerProc> fColorPointer;
|
||||
GLPtr<GrGLCompileShaderProc> fCompileShader;
|
||||
GLPtr<GrGLCompressedTexImage2DProc> fCompressedTexImage2D;
|
||||
GLPtr<GrGLCreateProgramProc> fCreateProgram;
|
||||
|
@ -26,7 +26,6 @@ const GrGLInterface* GrGLCreateNativeInterface() {
|
||||
interface->fBindTexture = glBindTexture;
|
||||
interface->fBlendColor = glBlendColor;
|
||||
interface->fBlendFunc = glBlendFunc;
|
||||
interface->fBlendEquation = glBlendEquation;
|
||||
interface->fBufferData = glBufferData;
|
||||
interface->fBufferSubData = glBufferSubData;
|
||||
interface->fClear = glClear;
|
||||
|
@ -20,7 +20,6 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLBindTexture(GrGLenum target, GrGLuint texture
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE nullGLBlendColor(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha) {}
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE nullGLBindFragDataLocation(GrGLuint program, GrGLuint colorNumber, const GrGLchar* name) {}
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE nullGLBlendFunc(GrGLenum sfactor, GrGLenum dfactor) {}
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE nullGLBlendEquation(GrGLenum mode) {}
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE nullGLBufferData(GrGLenum target, GrGLsizeiptr size, const GrGLvoid* data, GrGLenum usage) {}
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE nullGLBufferSubData(GrGLenum target, GrGLintptr offset, GrGLsizeiptr size, const GrGLvoid* data) {}
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE nullGLClear(GrGLbitfield mask) {}
|
||||
@ -397,7 +396,6 @@ const GrGLInterface* GrGLCreateNullInterface() {
|
||||
interface->fBindTexture = nullGLBindTexture;
|
||||
interface->fBlendColor = nullGLBlendColor;
|
||||
interface->fBlendFunc = nullGLBlendFunc;
|
||||
interface->fBlendEquation = nullGLBlendEquation;
|
||||
interface->fBufferData = nullGLBufferData;
|
||||
interface->fBufferSubData = nullGLBufferSubData;
|
||||
interface->fClear = nullGLClear;
|
||||
|
@ -67,16 +67,6 @@
|
||||
/* GL_SRC1_ALPHA */
|
||||
#define GR_GL_ONE_MINUS_SRC1_ALPHA 0x88FB
|
||||
|
||||
/* BlendEquationSeparate */
|
||||
#define GR_GL_FUNC_ADD 0x8006
|
||||
#define GR_GL_BLEND_EQUATION 0x8009
|
||||
#define GR_GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
|
||||
#define GR_GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
|
||||
/* BlendSubtract */
|
||||
#define GR_GL_FUNC_SUBTRACT 0x800A
|
||||
#define GR_GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
|
||||
/* Separate Blend Functions */
|
||||
#define GR_GL_BLEND_DST_RGB 0x80C8
|
||||
#define GR_GL_BLEND_SRC_RGB 0x80C9
|
||||
|
@ -44,7 +44,6 @@ bool GrGLInterface::validate(GrGLBinding binding) const {
|
||||
NULL == fBindTexture ||
|
||||
NULL == fBlendFunc ||
|
||||
NULL == fBlendColor || // -> GL >= 1.4, ES >= 2.0 or extension
|
||||
NULL == fBlendEquation || // -> GL >= 1.4, ES >= 2.0 or extension
|
||||
NULL == fBufferData ||
|
||||
NULL == fBufferSubData ||
|
||||
NULL == fClear ||
|
||||
|
@ -46,7 +46,6 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
|
||||
GR_GET_PROC(GrGLBindTextureProc, BindTexture);
|
||||
GR_GET_PROC(GrGLBlendColorProc, BlendColor);
|
||||
GR_GET_PROC(GrGLBlendFuncProc, BlendFunc);
|
||||
GR_GET_PROC(GrGLBlendEquationProc, BlendEquation);
|
||||
GR_GET_PROC(GrGLBufferDataProc, BufferData);
|
||||
GR_GET_PROC(GrGLBufferSubDataProc, BufferSubData);
|
||||
GR_GET_PROC(GrGLClearProc, Clear);
|
||||
|
@ -72,7 +72,6 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLBindTexture(GrGLenum target, GrGLuint textur
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE debugGLBlendColor(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha) {}
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE debugGLBindFragDataLocation(GrGLuint program, GrGLuint colorNumber, const GrGLchar* name) {}
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE debugGLBlendFunc(GrGLenum sfactor, GrGLenum dfactor) {}
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE debugGLBlendEquation(GrGLenum mode) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
GrGLvoid GR_GL_FUNCTION_TYPE debugGLBufferData(GrGLenum target, GrGLsizeiptr size, const GrGLvoid* data, GrGLenum usage) {
|
||||
@ -930,7 +929,6 @@ const GrGLInterface* GrGLCreateDebugInterface() {
|
||||
interface->fBindTexture = debugGLBindTexture;
|
||||
interface->fBlendColor = debugGLBlendColor;
|
||||
interface->fBlendFunc = debugGLBlendFunc;
|
||||
interface->fBlendEquation = debugGLBlendEquation;
|
||||
interface->fBufferData = debugGLBufferData;
|
||||
interface->fBufferSubData = debugGLBufferSubData;
|
||||
interface->fClear = debugGLClear;
|
||||
|
@ -51,19 +51,10 @@ const GrGLInterface* GrGLCreateNativeInterface() {
|
||||
|
||||
if (ver >= GR_GL_VER(1,4)) {
|
||||
interface->fBlendColor = glBlendColor;
|
||||
interface->fBlendEquation = glBlendEquation;
|
||||
} else if (GrGLHasExtensionFromString("GL_ARB_imaging", extStr)) {
|
||||
} else if (GrGLHasExtensionFromString("GL_ARB_imaging", extStr) ||
|
||||
GrGLHasExtensionFromString("GL_EXT_blend_color", extStr)) {
|
||||
GET_PROC(BlendColor);
|
||||
GET_PROC(BlendEquation);
|
||||
} else {
|
||||
if (GrGLHasExtensionFromString("GL_EXT_blend_color", extStr)) {
|
||||
GET_PROC_SUFFIX(BlendColor, EXT);
|
||||
}
|
||||
if (GrGLHasExtensionFromString("GL_EXT_blend_minmax", extStr) ||
|
||||
GrGLHasExtensionFromString("GL_EXT_blend_subtract", extStr)) {
|
||||
GET_PROC_SUFFIX(BlendEquation, EXT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface->fBufferData = glBufferData;
|
||||
interface->fBufferSubData = glBufferSubData;
|
||||
@ -71,7 +62,6 @@ const GrGLInterface* GrGLCreateNativeInterface() {
|
||||
interface->fClearColor = glClearColor;
|
||||
interface->fClearStencil = glClearStencil;
|
||||
interface->fColorMask = glColorMask;
|
||||
interface->fColorPointer = glColorPointer;
|
||||
interface->fCompileShader = glCompileShader;
|
||||
interface->fCompressedTexImage2D = glCompressedTexImage2D;
|
||||
interface->fCreateProgram = glCreateProgram;
|
||||
|
@ -44,18 +44,10 @@ const GrGLInterface* GrGLCreateMesaInterface() {
|
||||
GR_GL_GET_PROC(BlendFunc);
|
||||
|
||||
if (glVer >= GR_GL_VER(1,4) ||
|
||||
GrGLHasExtensionFromString("GL_ARB_imaging", extString)) {
|
||||
GrGLHasExtensionFromString("GL_ARB_imaging", extString) ||
|
||||
GrGLHasExtensionFromString("GL_EXT_blend_color", extString)) {
|
||||
GR_GL_GET_PROC(BlendColor);
|
||||
GR_GL_GET_PROC(BlendEquation);
|
||||
} else {
|
||||
if (GrGLHasExtensionFromString("GL_EXT_blend_color", extString)) {
|
||||
GR_GL_GET_PROC_SUFFIX(BlendColor, EXT);
|
||||
}
|
||||
if (GrGLHasExtensionFromString("GL_EXT_blend_minmax", extString) ||
|
||||
GrGLHasExtensionFromString("GL_EXT_blend_subtract", extString)) {
|
||||
GR_GL_GET_PROC_SUFFIX(BlendEquation, EXT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GR_GL_GET_PROC(BufferData);
|
||||
GR_GL_GET_PROC(BufferSubData);
|
||||
|
@ -43,17 +43,9 @@ const GrGLInterface* GrGLCreateNativeInterface() {
|
||||
interface->fBlendFunc = glBlendFunc;
|
||||
|
||||
if (glVer >= GR_GL_VER(1,4) ||
|
||||
GrGLHasExtensionFromString("GL_ARB_imaging", extString)) {
|
||||
GrGLHasExtensionFromString("GL_ARB_imaging", extString) ||
|
||||
GrGLHasExtensionFromString("GL_EXT_blend_color", extString)) {
|
||||
GR_GL_GET_PROC(BlendColor);
|
||||
GR_GL_GET_PROC(BlendEquation);
|
||||
} else {
|
||||
if (GrGLHasExtensionFromString("GL_EXT_blend_color", extString)) {
|
||||
GR_GL_GET_PROC_SUFFIX(BlendColor, EXT);
|
||||
}
|
||||
if (GrGLHasExtensionFromString("GL_EXT_blend_minmax", extString) ||
|
||||
GrGLHasExtensionFromString("GL_EXT_blend_subtract", extString)) {
|
||||
GR_GL_GET_PROC_SUFFIX(BlendEquation, EXT);
|
||||
}
|
||||
}
|
||||
|
||||
GR_GL_GET_PROC(BufferData);
|
||||
@ -62,7 +54,6 @@ const GrGLInterface* GrGLCreateNativeInterface() {
|
||||
interface->fClearColor = glClearColor;
|
||||
interface->fClearStencil = glClearStencil;
|
||||
interface->fColorMask = glColorMask;
|
||||
interface->fColorPointer = glColorPointer;
|
||||
GR_GL_GET_PROC(CompileShader);
|
||||
interface->fCompressedTexImage2D = glCompressedTexImage2D;
|
||||
GR_GL_GET_PROC(CreateProgram);
|
||||
|
@ -44,24 +44,15 @@ const GrGLInterface* GrGLCreateNativeInterface() {
|
||||
interface->fBlendFunc = glBlendFunc;
|
||||
|
||||
if (glVer >= GR_GL_VER(1,4) ||
|
||||
GrGLHasExtensionFromString("GL_ARB_imaging", extString)) {
|
||||
GrGLHasExtensionFromString("GL_ARB_imaging", extString) ||
|
||||
GrGLHasExtensionFromString("GL_EXT_blend_color", extString)) {
|
||||
GR_GL_GET_PROC(BlendColor);
|
||||
GR_GL_GET_PROC(BlendEquation);
|
||||
} else {
|
||||
if (GrGLHasExtensionFromString("GL_EXT_blend_color", extString)) {
|
||||
GR_GL_GET_PROC_SUFFIX(BlendColor, EXT);
|
||||
}
|
||||
if (GrGLHasExtensionFromString("GL_EXT_blend_minmax", extString) ||
|
||||
GrGLHasExtensionFromString("GL_EXT_blend_subtract", extString)) {
|
||||
GR_GL_GET_PROC_SUFFIX(BlendEquation, EXT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface->fClear = glClear;
|
||||
interface->fClearColor = glClearColor;
|
||||
interface->fClearStencil = glClearStencil;
|
||||
interface->fColorMask = glColorMask;
|
||||
interface->fColorPointer = glColorPointer;
|
||||
interface->fCullFace = glCullFace;
|
||||
interface->fDeleteTextures = glDeleteTextures;
|
||||
interface->fDepthMask = glDepthMask;
|
||||
|
Loading…
Reference in New Issue
Block a user