blob: 64adf1d9f9a023f36e9360af9d66fc056394f79c [file] [log] [blame]
commit-bot@chromium.org2a05de02014-03-25 15:17:32 +00001/*
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
commit-bot@chromium.org2a05de02014-03-25 15:17:32 +000011#include "SkTraceEvent.h"
12
Robert Phillips646e4292017-06-13 12:44:56 -040013class GrContext;
14
commit-bot@chromium.org2a05de02014-03-25 15:17:32 +000015/**
joshualitt87a721b2016-01-12 12:59:28 -080016 * Context level GrTracing macros, classname and op are const char*, context is GrContext
joshualitt87a721b2016-01-12 12:59:28 -080017 */
Brian Salomon23356442018-11-30 15:33:19 -050018#define GR_CREATE_TRACE_MARKER_CONTEXT(classname, op, context) \
Robert Phillipsd6841482019-02-08 10:29:20 -050019 GR_AUDIT_TRAIL_AUTO_FRAME(context->priv().auditTrail(), classname "::" op); \
Brian Salomon23356442018-11-30 15:33:19 -050020 TRACE_EVENT0("skia.gpu", classname "::" op)
egdaniel93a37bc2014-07-21 13:47:57 -070021
commit-bot@chromium.org2a05de02014-03-25 15:17:32 +000022#endif