aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-03 14:22:30 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-03 14:22:30 +0000
commitc49d66b04e0014f6b3be8346e4e4906d6807eb2d (patch)
tree62456e3613da930e828b9ac1e86aa8948a70c4f8
parentd32c5f564e4aa9ada2650e07d3856d5b21cd2138 (diff)
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
-rw-r--r--gpu/include/GrGLInterface.h2
-rw-r--r--gpu/src/GrGLInterface.cpp3
-rw-r--r--gpu/src/android/GrGLDefaultInterface_android.cpp1
-rw-r--r--gpu/src/ios/GrGLDefaultInterface_iOS.cpp1
-rw-r--r--gpu/src/mac/GrGLDefaultInterface_mac.cpp1
-rw-r--r--gpu/src/mesa/GrGLDefaultInterface_mesa.cpp1
-rw-r--r--gpu/src/unix/GrGLDefaultInterface_unix.cpp1
-rw-r--r--gpu/src/win/GrGLDefaultInterface_win.cpp1
8 files changed, 10 insertions, 1 deletions
diff --git a/gpu/include/GrGLInterface.h b/gpu/include/GrGLInterface.h
index 63ebca524a..0e0c5666b1 100644
--- a/gpu/include/GrGLInterface.h
+++ b/gpu/include/GrGLInterface.h
@@ -136,6 +136,7 @@ extern "C" {
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 *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 *GrGLScissorProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLShadeModelProc)(GrGLenum mode);
@@ -291,6 +292,7 @@ struct GrGLInterface {
GrGLMatrixModeProc fMatrixMode;
GrGLPixelStoreiProc fPixelStorei;
GrGLPointSizeProc fPointSize;
+ GrGLReadBufferProc fReadBuffer;
GrGLReadPixelsProc fReadPixels;
GrGLScissorProc fScissor;
GrGLShadeModelProc fShadeModel;
diff --git a/gpu/src/GrGLInterface.cpp b/gpu/src/GrGLInterface.cpp
index 9822dcbec4..2a8ffaaeb4 100644
--- a/gpu/src/GrGLInterface.cpp
+++ b/gpu/src/GrGLInterface.cpp
@@ -313,7 +313,8 @@ bool GrGLInterface::validate(GrEngine engine) const {
if (kDesktop_GrGLBinding == fBindingsExported &&
(NULL == fLineWidth ||
NULL == fGetTexLevelParameteriv ||
- NULL == fDrawBuffer)) {
+ NULL == fDrawBuffer ||
+ NULL == fReadBuffer)) {
return false;
}
diff --git a/gpu/src/android/GrGLDefaultInterface_android.cpp b/gpu/src/android/GrGLDefaultInterface_android.cpp
index b402176de9..033a93cd2e 100644
--- a/gpu/src/android/GrGLDefaultInterface_android.cpp
+++ b/gpu/src/android/GrGLDefaultInterface_android.cpp
@@ -77,6 +77,7 @@ void GrGLSetDefaultGLInterface() {
NULL, // glMatrixMode
glPixelStorei,
NULL, // glPointSize
+ NULL, // glReadBuffer
glReadPixels,
glScissor,
NULL, // glShadeModel
diff --git a/gpu/src/ios/GrGLDefaultInterface_iOS.cpp b/gpu/src/ios/GrGLDefaultInterface_iOS.cpp
index 8bc9fc523e..7bdbcc7079 100644
--- a/gpu/src/ios/GrGLDefaultInterface_iOS.cpp
+++ b/gpu/src/ios/GrGLDefaultInterface_iOS.cpp
@@ -76,6 +76,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPointSize = glPointSize;
gDefaultInterface.fPixelStorei = glPixelStorei;
+ gDefaultInterface.fReadBuffer = NULL;
gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel;
diff --git a/gpu/src/mac/GrGLDefaultInterface_mac.cpp b/gpu/src/mac/GrGLDefaultInterface_mac.cpp
index 16d29388df..293f14c114 100644
--- a/gpu/src/mac/GrGLDefaultInterface_mac.cpp
+++ b/gpu/src/mac/GrGLDefaultInterface_mac.cpp
@@ -77,6 +77,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPointSize = glPointSize;
gDefaultInterface.fPixelStorei = glPixelStorei;
+ gDefaultInterface.fReadBuffer = glReadBuffer;
gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel;
diff --git a/gpu/src/mesa/GrGLDefaultInterface_mesa.cpp b/gpu/src/mesa/GrGLDefaultInterface_mesa.cpp
index 56f2cf73f9..c6be2dfe9b 100644
--- a/gpu/src/mesa/GrGLDefaultInterface_mesa.cpp
+++ b/gpu/src/mesa/GrGLDefaultInterface_mesa.cpp
@@ -91,6 +91,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPointSize = glPointSize;
gDefaultInterface.fPixelStorei = glPixelStorei;
+ gDefaultInterface.fReadBuffer = glReadBuffer;
gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel;
diff --git a/gpu/src/unix/GrGLDefaultInterface_unix.cpp b/gpu/src/unix/GrGLDefaultInterface_unix.cpp
index e38a76b338..01725b9db6 100644
--- a/gpu/src/unix/GrGLDefaultInterface_unix.cpp
+++ b/gpu/src/unix/GrGLDefaultInterface_unix.cpp
@@ -93,6 +93,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPointSize = glPointSize;
gDefaultInterface.fPixelStorei = glPixelStorei;
+ gDefaultInterface.fReadBuffer = glReadBuffer;
gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel;
diff --git a/gpu/src/win/GrGLDefaultInterface_win.cpp b/gpu/src/win/GrGLDefaultInterface_win.cpp
index 05f541404d..1bf04578ce 100644
--- a/gpu/src/win/GrGLDefaultInterface_win.cpp
+++ b/gpu/src/win/GrGLDefaultInterface_win.cpp
@@ -72,6 +72,7 @@ void GrGLSetDefaultGLInterface() {
gDefaultInterface.fMatrixMode = glMatrixMode;
gDefaultInterface.fPixelStorei = glPixelStorei;
gDefaultInterface.fPointSize = glPointSize;
+ gDefaultInterface.fReadBuffer = glReadBuffer;
gDefaultInterface.fReadPixels = glReadPixels;
gDefaultInterface.fScissor = glScissor;
gDefaultInterface.fShadeModel = glShadeModel;