Created
April 18, 2017 22:53
-
-
Save chinmaygarde/607eb86d5447615b9cf2804a4f8fb1ce to your computer and use it in GitHub Desktop.
Trace Skia GL Calls to Timeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h | |
index 7503371..6386d6a 100644 | |
--- a/src/gpu/gl/GrGLUtil.h | |
+++ b/src/gpu/gl/GrGLUtil.h | |
@@ -11,6 +11,7 @@ | |
#include "gl/GrGLInterface.h" | |
#include "GrGLDefines.h" | |
#include "GrStencilSettings.h" | |
+#include "SkTraceEvent.h" | |
class SkMatrix; | |
@@ -186,6 +187,7 @@ void GrGLClearErr(const GrGLInterface* gl); | |
// the caller wants to do its own glGetError() call and examine the error value. | |
#define GR_GL_CALL_NOERRCHECK(IFACE, X) \ | |
do { \ | |
+ TRACE_EVENT0("flutter", #X) \ | |
(IFACE)->fFunctions.f##X; \ | |
GR_GL_LOG_CALLS_IMPL(X); \ | |
} while (false) | |
@@ -200,6 +202,7 @@ void GrGLClearErr(const GrGLInterface* gl); | |
// same as GR_GL_CALL_RET but always skips the error check. | |
#define GR_GL_CALL_RET_NOERRCHECK(IFACE, RET, X) \ | |
do { \ | |
+ TRACE_EVENT0("flutter", #X) \ | |
(RET) = (IFACE)->fFunctions.f##X; \ | |
GR_GL_LOG_CALLS_IMPL(X); \ | |
} while (false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for today: