1 //
2 // Copyright 2019 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // trace.h: Wrappers for ANGLE trace event functions.
7 //
8 
9 #ifndef LIBANGLE_TRACE_H_
10 #define LIBANGLE_TRACE_H_
11 
12 #include <platform/Platform.h>
13 #include "third_party/trace_event/trace_event.h"
14 
15 // TODO: Pass platform directly to these methods. http://anglebug.com/1892
16 #define ANGLE_TRACE_EVENT_BEGIN0(CATEGORY, EVENT) \
17     TRACE_EVENT_BEGIN0(ANGLEPlatformCurrent(), CATEGORY, EVENT)
18 #define ANGLE_TRACE_EVENT_END0(CATEGORY, EVENT) \
19     TRACE_EVENT_END0(ANGLEPlatformCurrent(), CATEGORY, EVENT)
20 #define ANGLE_TRACE_EVENT_INSTANT0(CATEGORY, EVENT) \
21     TRACE_EVENT_INSTANT0(ANGLEPlatformCurrent(), CATEGORY, EVENT)
22 #define ANGLE_TRACE_EVENT0(CATEGORY, EVENT) TRACE_EVENT0(ANGLEPlatformCurrent(), CATEGORY, EVENT)
23 #define ANGLE_TRACE_EVENT1(CATEGORY, EVENT, NAME, PARAM) \
24     TRACE_EVENT1(ANGLEPlatformCurrent(), CATEGORY, EVENT, NAME, PARAM)
25 
26 #endif  // LIBANGLE_TRACE_H_
27