chromium/cc/debug/debug_colors.cc

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

#include "cc/debug/debug_colors.h"

#include "base/check_op.h"
#include "base/notreached.h"

namespace cc {

static float Scale(float width, float device_scale_factor) {}

// ======= Layer border colors =======

// Tiled content layers are orange.
SkColor4f DebugColors::TiledContentLayerBorderColor() {}
int DebugColors::TiledContentLayerBorderWidth(float device_scale_factor) {}

// Image layers are olive.
SkColor4f DebugColors::ImageLayerBorderColor() {}
int DebugColors::ImageLayerBorderWidth(float device_scale_factor) {}

// Non-tiled content layers area green.
SkColor4f DebugColors::ContentLayerBorderColor() {}
int DebugColors::ContentLayerBorderWidth(float device_scale_factor) {}

// Other container layers are yellow.
SkColor4f DebugColors::ContainerLayerBorderColor() {}
int DebugColors::ContainerLayerBorderWidth(float device_scale_factor) {}

// Surface layers are a blue-ish green.
SkColor4f DebugColors::SurfaceLayerBorderColor() {}
int DebugColors::SurfaceLayerBorderWidth(float device_scale_factor) {}

// Render surfaces are blue.
SkColor4f DebugColors::SurfaceBorderColor() {}
int DebugColors::SurfaceBorderWidth(float device_scale_factor) {}

// ======= Tile colors =======

// High-res tile borders are cyan.
SkColor4f DebugColors::HighResTileBorderColor() {}
int DebugColors::HighResTileBorderWidth(float device_scale_factor) {}

// Low-res tile borders are purple.
SkColor4f DebugColors::LowResTileBorderColor() {}
int DebugColors::LowResTileBorderWidth(float device_scale_factor) {}

// Other high-resolution tile borders are yellow.
SkColor4f DebugColors::ExtraHighResTileBorderColor() {}
int DebugColors::ExtraHighResTileBorderWidth(float device_scale_factor) {}

// Other low-resolution tile borders are green.
SkColor4f DebugColors::ExtraLowResTileBorderColor() {}
int DebugColors::ExtraLowResTileBorderWidth(float device_scale_factor) {}

// Missing tile borders are dark grey.
SkColor4f DebugColors::MissingTileBorderColor() {}
int DebugColors::MissingTileBorderWidth(float device_scale_factor) {}

// Solid color tile borders are grey.
SkColor4f DebugColors::SolidColorTileBorderColor() {}
int DebugColors::SolidColorTileBorderWidth(float device_scale_factor) {}

// OOM tile borders are red.
SkColor4f DebugColors::OOMTileBorderColor() {}
int DebugColors::OOMTileBorderWidth(float device_scale_factor) {}

// Direct picture borders are chartreuse.
SkColor4f DebugColors::DirectPictureBorderColor() {}
int DebugColors::DirectPictureBorderWidth(float device_scale_factor) {}

// Returns a color transform that shifts color toward red.
base::span<const float>
DebugColors::TintCompositedContentColorTransformMatrix() {}

// Compressed tile borders are blue.
SkColor4f DebugColors::CompressedTileBorderColor() {}
int DebugColors::CompressedTileBorderWidth(float device_scale_factor) {}

// ======= Checkerboard colors =======

// Non-debug checkerboards are grey.
SkColor4f DebugColors::DefaultCheckerboardColor() {}

// Invalidated tiles get sky blue checkerboards.
SkColor4f DebugColors::InvalidatedTileCheckerboardColor() {}

// Evicted tiles get pale red checkerboards.
SkColor4f DebugColors::EvictedTileCheckerboardColor() {}

// ======= Debug rect colors =======

static SkColor4f FadedGreen(int initial_value, int step) {}
// Paint rects in green.
SkColor4f DebugColors::PaintRectBorderColor(int step) {}
int DebugColors::PaintRectBorderWidth() {}
SkColor4f DebugColors::PaintRectFillColor(int step) {}

static SkColor4f FadedBlue(int initial_value, int step) {}
/// Layout Shift rects in blue.
SkColor4f DebugColors::LayoutShiftRectBorderColor() {}
int DebugColors::LayoutShiftRectBorderWidth() {}
SkColor4f DebugColors::LayoutShiftRectFillColor(int step) {}

// Property-changed rects in blue.
SkColor4f DebugColors::PropertyChangedRectBorderColor() {}
int DebugColors::PropertyChangedRectBorderWidth() {}
SkColor4f DebugColors::PropertyChangedRectFillColor() {}

// Surface damage rects in yellow-orange.
SkColor4f DebugColors::SurfaceDamageRectBorderColor() {}
int DebugColors::SurfaceDamageRectBorderWidth() {}
SkColor4f DebugColors::SurfaceDamageRectFillColor() {}

// Surface screen space rects in yellow-green.
SkColor4f DebugColors::ScreenSpaceLayerRectBorderColor() {}
int DebugColors::ScreenSpaceLayerRectBorderWidth() {}
SkColor4f DebugColors::ScreenSpaceLayerRectFillColor() {}

// Touch-event-handler rects in yellow.
SkColor4f DebugColors::TouchEventHandlerRectBorderColor() {}
int DebugColors::TouchEventHandlerRectBorderWidth() {}
SkColor4f DebugColors::TouchEventHandlerRectFillColor() {}

// Wheel-event-handler rects in green.
SkColor4f DebugColors::WheelEventHandlerRectBorderColor() {}
int DebugColors::WheelEventHandlerRectBorderWidth() {}
SkColor4f DebugColors::WheelEventHandlerRectFillColor() {}

// Scroll-event-handler rects in teal.
SkColor4f DebugColors::ScrollEventHandlerRectBorderColor() {}
int DebugColors::ScrollEventHandlerRectBorderWidth() {}
SkColor4f DebugColors::ScrollEventHandlerRectFillColor() {}

// Main-thread scroll hit-test rects in orange.
SkColor4f DebugColors::MainThreadScrollHitTestRectBorderColor() {}
int DebugColors::MainThreadScrollHitTestRectBorderWidth() {}
SkColor4f DebugColors::MainThreadScrollHitTestRectFillColor() {}

// Main-thread scroll repaint rects in yellow-orange.
SkColor4f DebugColors::MainThreadScrollRepaintRectBorderColor() {}
int DebugColors::MainThreadScrollRepaintRectBorderWidth() {}
SkColor4f DebugColors::MainThreadScrollRepaintRectFillColor() {}

// Raster-inducing scroll rects in light yellow-orange.
SkColor4f DebugColors::RasterInducingScrollRectBorderColor() {}
int DebugColors::RasterInducingScrollRectBorderWidth() {}
SkColor4f DebugColors::RasterInducingScrollRectFillColor() {}

// Animation bounds are lime-green.
SkColor4f DebugColors::LayerAnimationBoundsBorderColor() {}
int DebugColors::LayerAnimationBoundsBorderWidth() {}
SkColor4f DebugColors::LayerAnimationBoundsFillColor() {}

// Picture borders in transparent blue.
SkColor4f DebugColors::PictureBorderColor() {}

// ======= HUD widget colors =======

SkColor4f DebugColors::HUDBackgroundColor() {}
SkColor4f DebugColors::HUDSeparatorLineColor() {}
SkColor4f DebugColors::HUDIndicatorLineColor() {}
SkColor4f DebugColors::HUDTitleColor() {}

SkColor4f DebugColors::PlatformLayerTreeTextColor() {}
SkColor4f DebugColors::FPSDisplayTextAndGraphColor() {}

// Color used to represent dropped compositor frames.
SkColor4f DebugColors::FPSDisplayDroppedFrame() {}
// Color used to represent a "partial" frame, i.e. a frame that missed
// its commit deadline.
SkColor4f DebugColors::FPSDisplayMissedFrame() {}
// Color used to represent a frame that successfully rendered.
SkColor4f DebugColors::FPSDisplaySuccessfulFrame() {}

SkColor4f DebugColors::MemoryDisplayTextColor() {}

// Paint time display in green (similar to paint times in the WebInspector)
SkColor4f DebugColors::PaintTimeDisplayTextAndGraphColor() {}

SkColor4f DebugColors::NonLCDTextHighlightColor(
    LCDTextDisallowedReason reason) {}

}  // namespace cc