xref: /aosp_15_r20/external/skia/src/gpu/ganesh/GrTracing.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 /*
2  * Copyright 2014 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef GrTracing_DEFINED
9 #define GrTracing_DEFINED
10 
11 #include "src/core/SkTraceEvent.h"  // IWYU pragma: keep
12 #include "src/core/SkTraceEventCommon.h"
13 #include "src/gpu/ganesh/GrAuditTrail.h"
14 
15 /**
16  * Context level GrTracing macros, classname and op are const char*, context is GrContext
17  */
18 #define GR_CREATE_TRACE_MARKER_CONTEXT(classname, op, context)                            \
19     GR_AUDIT_TRAIL_AUTO_FRAME(context->priv().auditTrail(), classname "::" op); \
20     TRACE_EVENT0("skia.gpu", classname "::" op)
21 
22 #endif
23