#include "third_party/blink/renderer/core/html/canvas/canvas_performance_monitor.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/trace_event/trace_event.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h"
#include "third_party/blink/renderer/platform/heap/process_heap.h"
#include "third_party/blink/renderer/platform/wtf/bit_field.h"
namespace {
TimeTicks;
CanvasRenderingContext;
const char* const kHostTypeName_Canvas = …;
const char* const kHostTypeName_OffscreenCanvas = …;
const char* const kRenderingAPIName_2D_Accelerated = …;
const char* const kRenderingAPIName_2D_Unaccelerated = …;
const char* const kRenderingAPIName_WebGL = …;
const char* const kRenderingAPIName_WebGL2 = …;
const char* const kRenderingAPIName_WebGPU = …;
const char* const kRenderingAPIName_ImageBitmap = …;
const char* const kFilterName_All = …;
const char* const kFilterName_Animation = …;
const char* const kFilterName_Path = …;
const char* const kFilterName_Image = …;
const char* const kFilterName_ImageData = …;
const char* const kFilterName_Rectangle = …;
const char* const kFilterName_Text = …;
const char* const kFilterName_DrawArrays = …;
const char* const kFilterName_DrawElements = …;
const char* const kMeasurementName_RenderTaskDuration = …;
const char* const kMeasurementName_PartitionAlloc = …;
const char* const kMeasurementName_BlinkGC = …;
static constexpr int kSamplingProbabilityInv = …;
class RenderingContextDescriptionCodec { … };
RenderingContextDescriptionCodec::RenderingContextDescriptionCodec(
const CanvasRenderingContext* context) { … }
RenderingContextDescriptionCodec::RenderingContextDescriptionCodec(
const uint32_t& key)
: … { … }
CanvasRenderingContext::CanvasRenderingAPI
RenderingContextDescriptionCodec::GetRenderingAPI() const { … }
const char* RenderingContextDescriptionCodec::GetHostTypeName() const { … }
const char* RenderingContextDescriptionCodec::GetRenderingAPIName() const { … }
}
namespace blink {
void CanvasPerformanceMonitor::CurrentTaskDrawsToContext(
CanvasRenderingContext* context) { … }
void CanvasPerformanceMonitor::WillProcessTask(TimeTicks start_time) { … }
void CanvasPerformanceMonitor::RecordMetrics(TimeTicks start_time,
TimeTicks end_time) { … }
void CanvasPerformanceMonitor::DidProcessTask(TimeTicks start_time,
TimeTicks end_time) { … }
void CanvasPerformanceMonitor::ResetForTesting() { … }
}