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

Unified Diff: include/gpu/gl/GrGLTypes.h

Issue 1666803002: Add GL indirect drawing APIs (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_rastermultisample
Patch Set: Created 4 years, 11 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
Index: include/gpu/gl/GrGLTypes.h
diff --git a/include/gpu/gl/GrGLTypes.h b/include/gpu/gl/GrGLTypes.h
index 248ce8886d4ce6c914a2ed9d866bbf11bd2fc8d6..c3f2f0fbf0870c575558c486bd0f3ddd4f458f27 100644
--- a/include/gpu/gl/GrGLTypes.h
+++ b/include/gpu/gl/GrGLTypes.h
@@ -58,10 +58,40 @@ typedef signed long int GrGLintptr;
typedef signed long int GrGLsizeiptr;
#endif
typedef void* GrGLeglImage;
+
+typedef struct {
bsalomon 2016/02/04 16:33:41 Do we really need typedef struct? I don't really c
Chris Dalton 2016/02/04 20:45:55 No, I just wrote them as typedefs to feel more lik
bsalomon 2016/02/04 21:01:15 That's a good point, we should either go all in on
Chris Dalton 2016/02/04 21:05:41 Sounds good.
+ GrGLuint count;
+ GrGLuint instanceCount;
+ GrGLuint first;
+ GrGLuint baseInstance; // Requires EXT_base_instance on ES.
+} GrGLDrawArraysIndirectCommand;
+
+GR_STATIC_ASSERT(16 == sizeof(GrGLDrawArraysIndirectCommand));
+
+typedef struct {
+ GrGLuint count;
+ GrGLuint instanceCount;
+ GrGLuint firstIndex;
+ GrGLuint baseVertex;
+ GrGLuint baseInstance; // Requires EXT_base_instance on ES.
+} GrGLDrawElementsIndirectCommand;
+
+GR_STATIC_ASSERT(20 == sizeof(GrGLDrawElementsIndirectCommand));
+
/**
- * EGL types.
+ * KHR_debug
*/
+typedef void (GR_GL_FUNCTION_TYPE* GRGLDEBUGPROC)(GrGLenum source,
+ GrGLenum type,
+ GrGLuint id,
+ GrGLenum severity,
+ GrGLsizei length,
+ const GrGLchar* message,
+ const void* userParam);
+/**
+ * EGL types.
+ */
typedef void* GrEGLImage;
typedef void* GrEGLDisplay;
typedef void* GrEGLContext;

Powered by Google App Engine
This is Rietveld 408576698