Hash :
abf38572
Author :
Date :
2017-02-14T16:47:59
Remove old C++ ANGLE platform. Now that the new platform is in place, we can remove the old methods. Must be landed after https://codereview.chromium.org/2697463003/ BUG=angleproject:1892 BUG=chromium:678870 Change-Id: Ia29a3b120cf3521fc0409019c2e64e4dbc6f460d Reviewed-on: https://chromium-review.googlesource.com/441274 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
// Copyright (c) 2012 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.
#include "common/event_tracer.h"
#include "common/debug.h"
namespace angle
{
const unsigned char *GetTraceCategoryEnabledFlag(const char *name)
{
auto *platform = ANGLEPlatformCurrent();
ASSERT(platform);
const unsigned char *categoryEnabledFlag =
platform->getTraceCategoryEnabledFlag(platform, name);
if (categoryEnabledFlag != nullptr)
{
return categoryEnabledFlag;
}
static unsigned char disabled = 0;
return &disabled;
}
angle::TraceEventHandle AddTraceEvent(char phase,
const unsigned char *categoryGroupEnabled,
const char *name,
unsigned long long id,
int numArgs,
const char **argNames,
const unsigned char *argTypes,
const unsigned long long *argValues,
unsigned char flags)
{
auto *platform = ANGLEPlatformCurrent();
ASSERT(platform);
double timestamp = platform->monotonicallyIncreasingTime(platform);
if (timestamp != 0)
{
angle::TraceEventHandle handle =
platform->addTraceEvent(platform, phase, categoryGroupEnabled, name, id, timestamp,
numArgs, argNames, argTypes, argValues, flags);
ASSERT(handle != 0);
return handle;
}
return static_cast<angle::TraceEventHandle>(0);
}
} // namespace angle