#ifndef COMMON_DEBUG_H_
#define COMMON_DEBUG_H_
#include <assert.h>
#include <stdio.h>
#include <iomanip>
#include <ios>
#include <mutex>
#include <sstream>
#include <string>
#include "common/SimpleMutex.h"
#include "common/angleutils.h"
#include "common/entry_points_enum_autogen.h"
#include "common/log_utils.h"
#include "common/platform.h"
#if defined(ANGLE_PLATFORM_WINDOWS)
# include <sal.h>
typedef unsigned long DWORD;
typedef _Return_type_success_(return >= 0) long HRESULT;
#endif
#if !defined(TRACE_OUTPUT_FILE)
#define TRACE_OUTPUT_FILE …
#endif
namespace gl
{
class Context;
class [[nodiscard]] ScopedPerfEventHelper : angle::NonCopyable
{ … };
class DebugAnnotator : angle::NonCopyable
{ … };
void InitializeDebugAnnotations(DebugAnnotator *debugAnnotator);
void UninitializeDebugAnnotations();
bool DebugAnnotationsActive(const gl::Context *context);
bool DebugAnnotationsInitialized();
void InitializeDebugMutexIfNeeded();
angle::SimpleMutex &GetDebugMutex();
}
#if defined(ANGLE_ENABLE_DEBUG_TRACE)
#define ANGLE_STATE_VALIDATION_ENABLED
#endif
#if defined(__GNUC__)
#define ANGLE_CRASH() …
#else
#define ANGLE_CRASH …
#endif
#define ANGLE_UNUSED_VARIABLE(variable) …
#if defined(__clang__)
#define ANGLE_ENABLE_STRUCT_PADDING_WARNINGS …
#define ANGLE_DISABLE_STRUCT_PADDING_WARNINGS …
#elif defined(__GNUC__)
#define ANGLE_ENABLE_STRUCT_PADDING_WARNINGS …
#define ANGLE_DISABLE_STRUCT_PADDING_WARNINGS …
#elif defined(_MSC_VER)
#define ANGLE_ENABLE_STRUCT_PADDING_WARNINGS …
#define ANGLE_DISABLE_STRUCT_PADDING_WARNINGS …
#else
#define ANGLE_ENABLE_STRUCT_PADDING_WARNINGS
#define ANGLE_DISABLE_STRUCT_PADDING_WARNINGS
#endif
#if defined(__clang__)
#define ANGLE_DISABLE_SUGGEST_OVERRIDE_WARNINGS …
#define ANGLE_REENABLE_SUGGEST_OVERRIDE_WARNINGS …
#else
#define ANGLE_DISABLE_SUGGEST_OVERRIDE_WARNINGS
#define ANGLE_REENABLE_SUGGEST_OVERRIDE_WARNINGS
#endif
#if defined(__clang__)
#define ANGLE_DISABLE_EXTRA_SEMI_WARNING …
#define ANGLE_REENABLE_EXTRA_SEMI_WARNING …
#else
#define ANGLE_DISABLE_EXTRA_SEMI_WARNING
#define ANGLE_REENABLE_EXTRA_SEMI_WARNING
#endif
#if defined(__clang__)
#define ANGLE_DISABLE_EXTRA_SEMI_STMT_WARNING …
#define ANGLE_REENABLE_EXTRA_SEMI_STMT_WARNING …
#else
#define ANGLE_DISABLE_EXTRA_SEMI_STMT_WARNING
#define ANGLE_REENABLE_EXTRA_SEMI_STMT_WARNING
#endif
#if defined(__clang__)
#define ANGLE_DISABLE_SHADOWING_WARNING …
#define ANGLE_REENABLE_SHADOWING_WARNING …
#else
#define ANGLE_DISABLE_SHADOWING_WARNING
#define ANGLE_REENABLE_SHADOWING_WARNING
#endif
#if defined(__clang__)
#define ANGLE_DISABLE_DESTRUCTOR_OVERRIDE_WARNING …
#define ANGLE_REENABLE_DESTRUCTOR_OVERRIDE_WARNING …
#else
#define ANGLE_DISABLE_DESTRUCTOR_OVERRIDE_WARNING
#define ANGLE_REENABLE_DESTRUCTOR_OVERRIDE_WARNING
#endif
#if defined(__clang__)
#define ANGLE_DISABLE_UNUSED_FUNCTION_WARNING …
#define ANGLE_REENABLE_UNUSED_FUNCTION_WARNING …
#else
#define ANGLE_DISABLE_UNUSED_FUNCTION_WARNING
#define ANGLE_REENABLE_UNUSED_FUNCTION_WARNING
#endif
#endif