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

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
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;
}

Powered by Google App Engine
This is Rietveld 408576698