#ifndef SERVICES_VIZ_PUBLIC_CPP_GPU_COMMAND_BUFFER_METRICS_H_
#define SERVICES_VIZ_PUBLIC_CPP_GPU_COMMAND_BUFFER_METRICS_H_
#include <string>
#include "gpu/command_buffer/common/constants.h"
namespace viz {
namespace command_buffer_metrics {
enum class ContextType {
BROWSER_COMPOSITOR,
BROWSER_MAIN_THREAD,
BROWSER_RASTER_WORKER,
RENDERER_BLINK_WORKER,
RENDERER_COMPOSITOR,
RENDERER_RASTER_WORKER,
RENDERER_MAIN_THREAD,
VIDEO_ACCELERATOR,
VIDEO_CAPTURE,
VIDEO_TRACK_RECORDER,
WEBCODECS_READBACK,
WEBGL,
WEBGPU,
MEDIA,
UNKNOWN,
FOR_TESTING,
XR_COMPOSITING,
};
std::string ContextTypeToString(ContextType type);
void UmaRecordContextInitFailed(ContextType type);
void UmaRecordContextLost(ContextType type,
gpu::error::Error error,
gpu::error::ContextLostReason reason);
}
}
#endif