#include "cc/metrics/lcd_text_metrics_reporter.h"
#include "base/functional/function_ref.h"
#include "base/lazy_instance.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/numerics/safe_conversions.h"
#include "base/trace_event/trace_event.h"
#include "cc/base/histograms.h"
#include "cc/layers/picture_layer_impl.h"
#include "cc/paint/display_item_list.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/layer_tree_impl.h"
namespace cc {
namespace {
constexpr auto kMinimumTimeInterval = …;
constexpr unsigned kMinimumFrameInterval = …;
constexpr float kHighDPIDeviceScaleFactorThreshold = …;
constexpr char kMetricNameLCDTextKPixelsHighDPI[] = …;
constexpr char kMetricNameLCDTextKPixelsLowDPI[] = …;
constexpr char kMetricNameLCDTextLayersHighDPI[] = …;
constexpr char kMetricNameLCDTextLayersLowDPI[] = …;
void Report(const LayerTreeImpl* layer_tree,
base::FunctionRef<void(int64_t text_pixels,
LCDTextDisallowedReason)> report_layer) { … }
constexpr char const* kTraceCategory = …);
}
std::unique_ptr<LCDTextMetricsReporter> LCDTextMetricsReporter::CreateIfNeeded(
const LayerTreeHostImpl* layer_tree_host_impl) { … }
LCDTextMetricsReporter::LCDTextMetricsReporter(
const LayerTreeHostImpl* layer_tree_host_impl)
: … { … }
LCDTextMetricsReporter::~LCDTextMetricsReporter() = default;
void LCDTextMetricsReporter::NotifySubmitFrame(
const viz::BeginFrameArgs& args) { … }
void LCDTextMetricsReporter::NotifyPauseFrameProduction() { … }
}