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

Unified Diff: src/gpu/gl/GrGLInterface.cpp

Issue 174123003: Add hooks for GL_EXT_debug_marker in gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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 | « src/gpu/gl/GrGLExtensions.cpp ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLInterface.cpp
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index f7b0a53c20d54cba4cc101f60be337d61e9a5b0a..5bee4084ebab1e3b172bc569e60cc72ac572defb 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -18,6 +18,23 @@ void GrGLDefaultInterfaceCallback(const GrGLInterface*) {}
}
#endif
+const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface* interface,
+ GrGLInsertEventMarkerProc insertEventMarkerFn,
+ GrGLPushGroupMarkerProc pushGroupMarkerFn,
+ GrGLPopGroupMarkerProc popGroupMarkerFn) {
+ GrGLInterface* newInterface = GrGLInterface::NewClone(interface);
+
+ if (!newInterface->fExtensions.has("GL_EXT_debug_marker")) {
+ newInterface->fExtensions.add("GL_EXT_debug_marker");
+ }
+
+ newInterface->fInsertEventMarker = insertEventMarkerFn;
+ newInterface->fPushGroupMarker = pushGroupMarkerFn;
+ newInterface->fPopGroupMarker = popGroupMarkerFn;
+
+ return newInterface;
+}
+
const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) {
GrGLInterface* newInterface = GrGLInterface::NewClone(interface);
@@ -157,6 +174,7 @@ GrGLInterface::GrGLInterface()
, fGetStringi(&fFunctions.fGetStringi)
, fGetTexLevelParameteriv(&fFunctions.fGetTexLevelParameteriv)
, fGetUniformLocation(&fFunctions.fGetUniformLocation)
+ , fInsertEventMarker(&fFunctions.fInsertEventMarker)
, fLineWidth(&fFunctions.fLineWidth)
, fLinkProgram(&fFunctions.fLinkProgram)
, fLoadIdentity(&fFunctions.fLoadIdentity)
@@ -164,6 +182,8 @@ GrGLInterface::GrGLInterface()
, fMapBuffer(&fFunctions.fMapBuffer)
, fMatrixMode(&fFunctions.fMatrixMode)
, fPixelStorei(&fFunctions.fPixelStorei)
+ , fPopGroupMarker(&fFunctions.fPopGroupMarker)
+ , fPushGroupMarker(&fFunctions.fPushGroupMarker)
, fQueryCounter(&fFunctions.fQueryCounter)
, fReadBuffer(&fFunctions.fReadBuffer)
, fReadPixels(&fFunctions.fReadPixels)
@@ -655,5 +675,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;
}
« no previous file with comments | « src/gpu/gl/GrGLExtensions.cpp ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698