Chromium Code Reviews| Index: src/gpu/gl/GrGLInterface.cpp |
| diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp |
| index f7b0a53c20d54cba4cc101f60be337d61e9a5b0a..308e60477a6547ff69e3e11428536ba0e12adf42 100644 |
| --- a/src/gpu/gl/GrGLInterface.cpp |
| +++ b/src/gpu/gl/GrGLInterface.cpp |
| @@ -6,6 +6,7 @@ |
| */ |
| +#include "gl/GrGLDebugMarker.h" |
| #include "gl/GrGLInterface.h" |
| #include "gl/GrGLExtensions.h" |
| #include "gl/GrGLUtil.h" |
| @@ -18,6 +19,20 @@ void GrGLDefaultInterfaceCallback(const GrGLInterface*) {} |
| } |
| #endif |
| +const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface* interface) { |
| + GrGLInterface* newInterface = GrGLInterface::NewClone(interface); |
| + |
| + if (!newInterface->fExtensions.has("GL_EXT_debug_marker")) { |
| + newInterface->fExtensions.add("GL_EXT_debug_marker"); |
| + } |
| + |
| + newInterface->fInsertEventMarker = testInsertEventMarker; |
|
bsalomon
2014/02/20 22:14:13
Where are these defined?
|
| + newInterface->fPushGroupMarker = testPushGroupMarker; |
| + newInterface->fPopGroupMarker = testPopGroupMarker; |
| + |
| + return newInterface; |
| +} |
| + |
| const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) { |
| GrGLInterface* newInterface = GrGLInterface::NewClone(interface); |
| @@ -263,7 +278,10 @@ GrGLInterface::GrGLInterface() |
| , fIsPointInFillPath(&fFunctions.fIsPointInFillPath) |
| , fIsPointInStrokePath(&fFunctions.fIsPointInStrokePath) |
| , fGetPathLength(&fFunctions.fGetPathLength) |
| - , fPointAlongPath(&fFunctions.fPointAlongPath) { |
| + , fPointAlongPath(&fFunctions.fPointAlongPath) |
| + , fInsertEventMarker(&fFunctions.fInsertEventMarker) |
| + , fPushGroupMarker(&fFunctions.fPushGroupMarker) |
| + , fPopGroupMarker(&fFunctions.fPopGroupMarker) { |
| fStandard = kNone_GrGLStandard; |
| #if GR_GL_PER_GL_FUNC_CALLBACK |
| @@ -655,5 +673,15 @@ bool GrGLInterface::validate() const { |
| } |
| } |
| } |
| + |
| +#if 0 |
| + if (fExtensions.has("GL_EXT_debug_marker")) { |
| + if (NULL == fFunctions.fInsertEventMarker || |
| + NULL == fFunctions.fPushGroupMarker || |
| + NULL == fFunctions.fPopGroupMarker) { |
| + return false; |
| + } |
| + } |
| +#endif |
| return true; |
| } |