Hash :
ba319ba3
Author :
Date :
2018-12-29T10:29:33
Re-land "Load entry points dynamically in tests and samples." Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL headers. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57 Reviewed-on: https://chromium-review.googlesource.com/c/1392382 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
//
// Copyright (c) 2014 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.
//
#ifndef SAMPLE_UTIL_TIMER_H
#define SAMPLE_UTIL_TIMER_H
#include "util/util_export.h"
class ANGLE_UTIL_EXPORT Timer
{
public:
virtual ~Timer() {}
// Timer functionality: Use start() and stop() to record the duration and use getElapsedTime()
// to query that duration. If getElapsedTime() is called in between, it will report the elapsed
// time since start().
virtual void start() = 0;
virtual void stop() = 0;
virtual double getElapsedTime() const = 0;
// Timestamp functionality: Use getAbsoluteTime() to get an absolute time with an unknown
// origin. This time moves forward regardless of start()/stop().
virtual double getAbsoluteTime() = 0;
};
ANGLE_UTIL_EXPORT Timer *CreateTimer();
#endif // SAMPLE_UTIL_TIMER_H