diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-21 18:45:30 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-21 18:45:30 +0000 |
commit | a3baf3be0e2a3128fb73bd41d40d130f75a4dc86 (patch) | |
tree | 935d08c9f4098a57a4bde7bbffc2763fc863eae6 /include | |
parent | 5301070de894dbfa4772cf01e111450102837803 (diff) |
Add hooks for GL_EXT_debug_marker in gpu
BUG=skia:
R=bsalomon@google.com
Author: egdaniel@google.com
Review URL: https://codereview.chromium.org/174123003
git-svn-id: http://skia.googlecode.com/svn/trunk@13538 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/gl/GrGLExtensions.h | 5 | ||||
-rw-r--r-- | include/gpu/gl/GrGLFunctions.h | 4 | ||||
-rw-r--r-- | include/gpu/gl/GrGLInterface.h | 13 |
3 files changed, 22 insertions, 0 deletions
diff --git a/include/gpu/gl/GrGLExtensions.h b/include/gpu/gl/GrGLExtensions.h index 76516cf11f..dbfc3be45e 100644 --- a/include/gpu/gl/GrGLExtensions.h +++ b/include/gpu/gl/GrGLExtensions.h @@ -54,6 +54,11 @@ public: */ bool remove(const char[]); + /** + * Adds an extension to list + */ + void add(const char[]); + void reset() { fStrings->reset(); } void print(const char* sep = "\n") const; diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h index b6d68c7ff4..634af561dc 100644 --- a/include/gpu/gl/GrGLFunctions.h +++ b/include/gpu/gl/GrGLFunctions.h @@ -147,10 +147,13 @@ extern "C" { typedef const GrGLubyte* (GR_GL_FUNCTION_TYPE* GrGLGetStringiProc)(GrGLenum name, GrGLuint index); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetTexLevelParameterivProc)(GrGLenum target, GrGLint level, GrGLenum pname, GrGLint* params); typedef GrGLint (GR_GL_FUNCTION_TYPE* GrGLGetUniformLocationProc)(GrGLuint program, const char* name); + typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLInsertEventMarkerProc)(GrGLsizei length, const char* marker); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLLineWidthProc)(GrGLfloat width); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLLinkProgramProc)(GrGLuint program); typedef GrGLvoid* (GR_GL_FUNCTION_TYPE* GrGLMapBufferProc)(GrGLenum target, GrGLenum access); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPixelStoreiProc)(GrGLenum pname, GrGLint param); + typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPopGroupMarkerProc)(); + typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPushGroupMarkerProc)(GrGLsizei length, const char* marker); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLQueryCounterProc)(GrGLuint id, GrGLenum target); 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); @@ -261,6 +264,7 @@ extern "C" { typedef GrGLboolean (GR_GL_FUNCTION_TYPE* GrGLIsPointInStrokePathProc)(GrGLuint path, GrGLfloat x, GrGLfloat y); typedef GrGLfloat (GR_GL_FUNCTION_TYPE* GrGLGetPathLengthProc)(GrGLuint path, GrGLsizei startSegment, GrGLsizei numSegments); typedef GrGLboolean (GR_GL_FUNCTION_TYPE* GrGLPointAlongPathProc)(GrGLuint path, GrGLsizei startSegment, GrGLsizei numSegments, GrGLfloat distance, GrGLfloat *x, GrGLfloat *y, GrGLfloat *tangentX, GrGLfloat *tangentY); + } // extern "C" #endif diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h index f5bcd16682..52d96ef4cc 100644 --- a/include/gpu/gl/GrGLInterface.h +++ b/include/gpu/gl/GrGLInterface.h @@ -76,6 +76,13 @@ typedef intptr_t GrGLInterfaceCallbackData; GL_NV_path_rendering. */ const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface*); +/** Function that returns a new interface identical to "interface" but with support for + test version of GL_EXT_debug_marker. */ +const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface*, + GrGLInsertEventMarkerProc insertEventMarkerFn, + GrGLPushGroupMarkerProc pushGroupMarkerFn, + GrGLPopGroupMarkerProc popGroupMarkerFn); + /** * GrContext uses the following interface to make all calls into OpenGL. When a * GrContext is created it is given a GrGLInterface. The interface's function @@ -228,6 +235,7 @@ public: GLPtr<GrGLGetStringiProc> fGetStringi; GLPtr<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv; GLPtr<GrGLGetUniformLocationProc> fGetUniformLocation; + GLPtr<GrGLInsertEventMarkerProc> fInsertEventMarker; GLPtr<GrGLLineWidthProc> fLineWidth; GLPtr<GrGLLinkProgramProc> fLinkProgram; GLPtr<GrGLLoadIdentityProc> fLoadIdentity; @@ -235,6 +243,8 @@ public: GLPtr<GrGLMapBufferProc> fMapBuffer; GLPtr<GrGLMatrixModeProc> fMatrixMode; GLPtr<GrGLPixelStoreiProc> fPixelStorei; + GLPtr<GrGLPopGroupMarkerProc> fPopGroupMarker; + GLPtr<GrGLPushGroupMarkerProc> fPushGroupMarker; GLPtr<GrGLQueryCounterProc> fQueryCounter; GLPtr<GrGLReadBufferProc> fReadBuffer; GLPtr<GrGLReadPixelsProc> fReadPixels; @@ -445,6 +455,7 @@ public: GLPtrAlias<GrGLGetStringiProc> fGetStringi; GLPtrAlias<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv; GLPtrAlias<GrGLGetUniformLocationProc> fGetUniformLocation; + GLPtrAlias<GrGLInsertEventMarkerProc> fInsertEventMarker; GLPtrAlias<GrGLLineWidthProc> fLineWidth; GLPtrAlias<GrGLLinkProgramProc> fLinkProgram; GLPtrAlias<GrGLLoadIdentityProc> fLoadIdentity; @@ -452,6 +463,8 @@ public: GLPtrAlias<GrGLMapBufferProc> fMapBuffer; GLPtrAlias<GrGLMatrixModeProc> fMatrixMode; GLPtrAlias<GrGLPixelStoreiProc> fPixelStorei; + GLPtrAlias<GrGLPopGroupMarkerProc> fPopGroupMarker; + GLPtrAlias<GrGLPushGroupMarkerProc> fPushGroupMarker; GLPtrAlias<GrGLQueryCounterProc> fQueryCounter; GLPtrAlias<GrGLReadBufferProc> fReadBuffer; GLPtrAlias<GrGLReadPixelsProc> fReadPixels; |