Hash :
3ea463bf
Author :
Date :
2019-06-19T14:21:33
Move event tracer back into common. Requires that we update the TRACE_EVENT macros to accept a platform as an argument. The refactor isn't complete. In order to finish we'd need to ensure we have the Display's PlatformMethods available at all sites. Unblocks adding trace events directly in the perf tests. Bug: angleproject:1892 Bug: angleproject:3117 Change-Id: Iee0ca086ccfe23acab3fc186fb042f018711a94c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1664794 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// trace.h: Wrappers for ANGLE trace event functions.
//
#ifndef LIBANGLE_TRACE_H_
#define LIBANGLE_TRACE_H_
#include <platform/Platform.h>
#include "third_party/trace_event/trace_event.h"
// TODO: Pass platform directly to these methods. http://anglebug.com/1892
#define ANGLE_TRACE_EVENT_BEGIN0(CATEGORY, EVENT) \
TRACE_EVENT_BEGIN0(ANGLEPlatformCurrent(), CATEGORY, EVENT)
#define ANGLE_TRACE_EVENT_END0(CATEGORY, EVENT) \
TRACE_EVENT_END0(ANGLEPlatformCurrent(), CATEGORY, EVENT)
#define ANGLE_TRACE_EVENT_INSTANT0(CATEGORY, EVENT) \
TRACE_EVENT_INSTANT0(ANGLEPlatformCurrent(), CATEGORY, EVENT)
#define ANGLE_TRACE_EVENT0(CATEGORY, EVENT) TRACE_EVENT0(ANGLEPlatformCurrent(), CATEGORY, EVENT)
#endif // LIBANGLE_TRACE_H_