aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-19 17:47:02 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-19 17:47:02 +0000
commit0e45441994a36a78a7a14681799ac519a2b8aae7 (patch)
tree9bcce5f1cb1e448525054ec9af693c019c500f09 /include
parent65245ade841a7aa4d71b1760c081959c71cb4560 (diff)
Add Mesa as a GL backend.
Diffstat (limited to 'include')
-rw-r--r--include/utils/SkEGLContext.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/utils/SkEGLContext.h b/include/utils/SkEGLContext.h
index 6aa8518e53..d67cf0c317 100644
--- a/include/utils/SkEGLContext.h
+++ b/include/utils/SkEGLContext.h
@@ -1,7 +1,9 @@
#ifndef SkEGLContext_DEFINED
#define SkEGLContext_DEFINED
-#if defined(SK_BUILD_FOR_MAC)
+#if defined(SK_MESA)
+ #include "GL/osmesa.h"
+#elif defined(SK_BUILD_FOR_MAC)
#include <AGL/agl.h>
#elif defined(SK_BUILD_FOR_UNIX)
#include <X11/Xlib.h>
@@ -18,10 +20,13 @@ public:
SkEGLContext();
~SkEGLContext();
- bool init(int width, int height);
+ bool init(const int width, const int height);
private:
-#if defined(SK_BUILD_FOR_MAC)
+#if defined(SK_MESA)
+ OSMesaContext context;
+ GLfloat *image;
+#elif defined(SK_BUILD_FOR_MAC)
AGLContext context;
#elif defined(SK_BUILD_FOR_UNIX)
GLXContext context;