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

Unified Diff: gpu/command_buffer/common/gles2_cmd_format.h

Issue 2134006: Added EGL based GLContext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/gles2_cmd_format.h
===================================================================
--- gpu/command_buffer/common/gles2_cmd_format.h (revision 49195)
+++ gpu/command_buffer/common/gles2_cmd_format.h (working copy)
@@ -7,26 +7,9 @@
#ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_
#define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_
-// This is here because service side code must include the system's version of
-// the GL headers where as client side code includes the Chrome version. Also
-// the unit test code must include a mock GL header.
-#if defined(UNIT_TEST)
- #include "../service/gl_mock.h"
-#elif defined(GLES2_GPU_SERVICE)
- // TODO(gman): Set this from gyp
- // #define GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2 1
- #if defined(GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2)
- #include <GLES2/gl2.h> // NOLINT
- #else // !GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2
- #include <GL/glew.h> // NOLINT
- #if defined(OS_WIN)
- #include <GL/wglew.h> // NOLINT
- #endif
- #endif // !GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2
-#else // !GLES2_CPU_SERVICE
- #include <GLES2/gl2types.h> // NOLINT
-#endif // UNIT_TEST
+#include <KHR/khrplatform.h>
+
#include <string.h>
#include "../common/types.h"
@@ -34,6 +17,28 @@
#include "../common/cmd_buffer_common.h"
#include "../common/gles2_cmd_ids.h"
+// GL types are forward declared to avoid including the GL headers. The problem
+// is determining which GL headers to include from code that is common to the
+// client and service sides (GLES2 or one of several GL implementations).
+typedef unsigned int GLenum;
+typedef unsigned int GLbitfield;
+typedef unsigned int GLuint;
+typedef int GLint;
+typedef int GLsizei;
+typedef unsigned char GLboolean;
+typedef signed char GLbyte;
+typedef short GLshort;
+typedef unsigned char GLubyte;
+typedef unsigned short GLushort;
+typedef unsigned long GLulong;
+typedef float GLfloat;
+typedef float GLclampf;
+typedef double GLdouble;
+typedef double GLclampd;
+typedef void GLvoid;
+typedef khronos_intptr_t GLintptr;
+typedef khronos_ssize_t GLsizeiptr;
+
namespace gpu {
namespace gles2 {
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698