chromium/third_party/blink/renderer/core/html/canvas/canvas_performance_monitor.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 =;

// The inverse of the probability that a given task will be measured.
// I.e. a value of X means that each task has a probability 1/X of being
// measured.
static constexpr int kSamplingProbabilityInv =;

// Encodes and decodes information about a CanvasRenderingContext as a
// 32-bit value.
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 {}

}  // unnamed namespace

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() {}

}  // namespace blink