Add glReadBuffer to GrGLInterface.

Review URL: http://codereview.appspot.com/4841048/





git-svn-id: http://skia.googlecode.com/svn/trunk@2034 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2011-08-03 14:22:30 +00:00
parent d32c5f564e
commit c49d66b04e
8 changed files with 10 additions and 1 deletions

View File

@ -136,6 +136,7 @@ extern "C" {
typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLMatrixModeProc)(GrGLenum mode); typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLMatrixModeProc)(GrGLenum mode);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLPixelStoreiProc)(GrGLenum pname, GrGLint param); typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLPixelStoreiProc)(GrGLenum pname, GrGLint param);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLPointSizeProc)(GrGLfloat size); typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLPointSizeProc)(GrGLfloat size);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLReadBufferProc)(GrGLenum src);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLReadPixelsProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, GrGLvoid* pixels); typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLReadPixelsProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, GrGLvoid* pixels);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLScissorProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height); typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLScissorProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLShadeModelProc)(GrGLenum mode); typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLShadeModelProc)(GrGLenum mode);
@ -291,6 +292,7 @@ struct GrGLInterface {
GrGLMatrixModeProc fMatrixMode; GrGLMatrixModeProc fMatrixMode;
GrGLPixelStoreiProc fPixelStorei; GrGLPixelStoreiProc fPixelStorei;
GrGLPointSizeProc fPointSize; GrGLPointSizeProc fPointSize;
GrGLReadBufferProc fReadBuffer;
GrGLReadPixelsProc fReadPixels; GrGLReadPixelsProc fReadPixels;
GrGLScissorProc fScissor; GrGLScissorProc fScissor;
GrGLShadeModelProc fShadeModel; GrGLShadeModelProc fShadeModel;

View File

@ -313,7 +313,8 @@ bool GrGLInterface::validate(GrEngine engine) const {
if (kDesktop_GrGLBinding == fBindingsExported && if (kDesktop_GrGLBinding == fBindingsExported &&
(NULL == fLineWidth || (NULL == fLineWidth ||
NULL == fGetTexLevelParameteriv || NULL == fGetTexLevelParameteriv ||
NULL == fDrawBuffer)) { NULL == fDrawBuffer ||
NULL == fReadBuffer)) {
return false; return false;
} }

View File

@ -77,6 +77,7 @@ void GrGLSetDefaultGLInterface() {
NULL, // glMatrixMode NULL, // glMatrixMode
glPixelStorei, glPixelStorei,
NULL, // glPointSize NULL, // glPointSize
NULL, // glReadBuffer
glReadPixels, glReadPixels,
glScissor, glScissor,
NULL, // glShadeModel NULL, // glShadeModel

View File

@ -76,6 +76,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode; gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPointSize = glPointSize; gDefaultInterface.fPointSize = glPointSize;
gDefaultInterface.fPixelStorei = glPixelStorei; gDefaultInterface.fPixelStorei = glPixelStorei;
gDefaultInterface.fReadBuffer = NULL;
gDefaultInterface.fReadPixels = glReadPixels; gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor; gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel; gDefaultInterface.fShadeModel = glShadeModel;

View File

@ -77,6 +77,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode; gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPointSize = glPointSize; gDefaultInterface.fPointSize = glPointSize;
gDefaultInterface.fPixelStorei = glPixelStorei; gDefaultInterface.fPixelStorei = glPixelStorei;
gDefaultInterface.fReadBuffer = glReadBuffer;
gDefaultInterface.fReadPixels = glReadPixels; gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor; gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel; gDefaultInterface.fShadeModel = glShadeModel;

View File

@ -91,6 +91,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode; gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPointSize = glPointSize; gDefaultInterface.fPointSize = glPointSize;
gDefaultInterface.fPixelStorei = glPixelStorei; gDefaultInterface.fPixelStorei = glPixelStorei;
gDefaultInterface.fReadBuffer = glReadBuffer;
gDefaultInterface.fReadPixels = glReadPixels; gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor; gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel; gDefaultInterface.fShadeModel = glShadeModel;

View File

@ -93,6 +93,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode; gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPointSize = glPointSize; gDefaultInterface.fPointSize = glPointSize;
gDefaultInterface.fPixelStorei = glPixelStorei; gDefaultInterface.fPixelStorei = glPixelStorei;
gDefaultInterface.fReadBuffer = glReadBuffer;
gDefaultInterface.fReadPixels = glReadPixels; gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor; gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel; gDefaultInterface.fShadeModel = glShadeModel;

View File

@ -72,6 +72,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode; gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPixelStorei = glPixelStorei; gDefaultInterface.fPixelStorei = glPixelStorei;
gDefaultInterface.fPointSize = glPointSize; gDefaultInterface.fPointSize = glPointSize;
gDefaultInterface.fReadBuffer = glReadBuffer;
gDefaultInterface.fReadPixels = glReadPixels; gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor; gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel; gDefaultInterface.fShadeModel = glShadeModel;