This source file includes following definitions.
- Scale
- TiledContentLayerBorderColor
- TiledContentLayerBorderWidth
- ImageLayerBorderColor
- ImageLayerBorderWidth
- ContentLayerBorderColor
- ContentLayerBorderWidth
- MaskingLayerBorderColor
- MaskingLayerBorderWidth
- ContainerLayerBorderColor
- ContainerLayerBorderWidth
- SurfaceLayerBorderColor
- SurfaceLayerBorderWidth
- SurfaceBorderColor
- SurfaceBorderWidth
- SurfaceReplicaBorderColor
- SurfaceReplicaBorderWidth
- HighResTileBorderColor
- HighResTileBorderWidth
- LowResTileBorderColor
- LowResTileBorderWidth
- ExtraHighResTileBorderColor
- ExtraHighResTileBorderWidth
- ExtraLowResTileBorderColor
- ExtraLowResTileBorderWidth
- MissingTileBorderColor
- MissingTileBorderWidth
- SolidColorTileBorderColor
- SolidColorTileBorderWidth
- PictureTileBorderColor
- PictureTileBorderWidth
- DirectPictureBorderColor
- DirectPictureBorderWidth
- DefaultCheckerboardColor
- InvalidatedTileCheckerboardColor
- EvictedTileCheckerboardColor
- FadedGreen
- PaintRectBorderColor
- PaintRectBorderWidth
- PaintRectFillColor
- PropertyChangedRectBorderColor
- PropertyChangedRectBorderWidth
- PropertyChangedRectFillColor
- SurfaceDamageRectBorderColor
- SurfaceDamageRectBorderWidth
- SurfaceDamageRectFillColor
- ScreenSpaceLayerRectBorderColor
- ScreenSpaceLayerRectBorderWidth
- ScreenSpaceLayerRectFillColor
- ScreenSpaceSurfaceReplicaRectBorderColor
- ScreenSpaceSurfaceReplicaRectBorderWidth
- ScreenSpaceSurfaceReplicaRectFillColor
- OccludingRectBorderColor
- OccludingRectBorderWidth
- OccludingRectFillColor
- NonOccludingRectBorderColor
- NonOccludingRectBorderWidth
- NonOccludingRectFillColor
- TouchEventHandlerRectBorderColor
- TouchEventHandlerRectBorderWidth
- TouchEventHandlerRectFillColor
- WheelEventHandlerRectBorderColor
- WheelEventHandlerRectBorderWidth
- WheelEventHandlerRectFillColor
- ScrollEventHandlerRectBorderColor
- ScrollEventHandlerRectBorderWidth
- ScrollEventHandlerRectFillColor
- NonFastScrollableRectBorderColor
- NonFastScrollableRectBorderWidth
- NonFastScrollableRectFillColor
- LayerAnimationBoundsBorderColor
- LayerAnimationBoundsBorderWidth
- LayerAnimationBoundsFillColor
- NonPaintedFillColor
- MissingPictureFillColor
- PictureBorderColor
- HUDBackgroundColor
- HUDSeparatorLineColor
- HUDIndicatorLineColor
- PlatformLayerTreeTextColor
- FPSDisplayTextAndGraphColor
- MemoryDisplayTextColor
- PaintTimeDisplayTextAndGraphColor
#include "base/macros.h"
#include "cc/debug/debug_colors.h"
#include "cc/trees/layer_tree_impl.h"
namespace cc {
static float Scale(float width, const LayerTreeImpl* tree_impl) {
return width * (tree_impl ? tree_impl->device_scale_factor() : 1);
}
SkColor DebugColors::TiledContentLayerBorderColor() {
return SkColorSetARGB(128, 255, 128, 0);
}
int DebugColors::TiledContentLayerBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::ImageLayerBorderColor() {
return SkColorSetARGB(128, 128, 128, 0);
}
int DebugColors::ImageLayerBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::ContentLayerBorderColor() {
return SkColorSetARGB(128, 0, 128, 32);
}
int DebugColors::ContentLayerBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::MaskingLayerBorderColor() {
return SkColorSetARGB(48, 128, 255, 255);
}
int DebugColors::MaskingLayerBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(20, tree_impl);
}
SkColor DebugColors::ContainerLayerBorderColor() {
return SkColorSetARGB(192, 255, 255, 0);
}
int DebugColors::ContainerLayerBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::SurfaceLayerBorderColor() {
return SkColorSetARGB(128, 0, 255, 136);
}
int DebugColors::SurfaceLayerBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::SurfaceBorderColor() {
return SkColorSetARGB(100, 0, 0, 255);
}
int DebugColors::SurfaceBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::SurfaceReplicaBorderColor() {
return SkColorSetARGB(100, 160, 0, 255);
}
int DebugColors::SurfaceReplicaBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::HighResTileBorderColor() {
return SkColorSetARGB(100, 80, 200, 200);
}
int DebugColors::HighResTileBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(1, tree_impl);
}
SkColor DebugColors::LowResTileBorderColor() {
return SkColorSetARGB(100, 212, 83, 192);
}
int DebugColors::LowResTileBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::ExtraHighResTileBorderColor() {
return SkColorSetARGB(100, 239, 231, 20);
}
int DebugColors::ExtraHighResTileBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::ExtraLowResTileBorderColor() {
return SkColorSetARGB(100, 93, 186, 18);
}
int DebugColors::ExtraLowResTileBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl);
}
SkColor DebugColors::MissingTileBorderColor() {
return SkColorSetARGB(100, 255, 0, 0);
}
int DebugColors::MissingTileBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(1, tree_impl);
}
SkColor DebugColors::SolidColorTileBorderColor() {
return SkColorSetARGB(128, 128, 128, 128);
}
int DebugColors::SolidColorTileBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(1, tree_impl);
}
SkColor DebugColors::PictureTileBorderColor() {
return SkColorSetARGB(64, 64, 64, 0);
}
int DebugColors::PictureTileBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(1, tree_impl);
}
SkColor DebugColors::DirectPictureBorderColor() {
return SkColorSetARGB(255, 127, 255, 0);
}
int DebugColors::DirectPictureBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(1, tree_impl);
}
SkColor DebugColors::DefaultCheckerboardColor() {
return SkColorSetRGB(241, 241, 241);
}
SkColor DebugColors::InvalidatedTileCheckerboardColor() {
return SkColorSetRGB(128, 200, 245);
}
SkColor DebugColors::EvictedTileCheckerboardColor() {
return SkColorSetRGB(255, 200, 200);
}
static SkColor FadedGreen(int initial_value, int step) {
DCHECK_GE(step, 0);
DCHECK_LE(step, DebugColors::kFadeSteps);
int value = step * initial_value / DebugColors::kFadeSteps;
return SkColorSetARGB(value, 0, 195, 0);
}
SkColor DebugColors::PaintRectBorderColor(int step) {
return FadedGreen(255, step);
}
int DebugColors::PaintRectBorderWidth() { return 2; }
SkColor DebugColors::PaintRectFillColor(int step) {
return FadedGreen(60, step);
}
SkColor DebugColors::PropertyChangedRectBorderColor() {
return SkColorSetARGB(255, 0, 0, 255);
}
int DebugColors::PropertyChangedRectBorderWidth() { return 2; }
SkColor DebugColors::PropertyChangedRectFillColor() {
return SkColorSetARGB(30, 0, 0, 255);
}
SkColor DebugColors::SurfaceDamageRectBorderColor() {
return SkColorSetARGB(255, 200, 100, 0);
}
int DebugColors::SurfaceDamageRectBorderWidth() { return 2; }
SkColor DebugColors::SurfaceDamageRectFillColor() {
return SkColorSetARGB(30, 200, 100, 0);
}
SkColor DebugColors::ScreenSpaceLayerRectBorderColor() {
return SkColorSetARGB(255, 100, 200, 0);
}
int DebugColors::ScreenSpaceLayerRectBorderWidth() { return 2; }
SkColor DebugColors::ScreenSpaceLayerRectFillColor() {
return SkColorSetARGB(30, 100, 200, 0);
}
SkColor DebugColors::ScreenSpaceSurfaceReplicaRectBorderColor() {
return SkColorSetARGB(255, 100, 0, 200);
}
int DebugColors::ScreenSpaceSurfaceReplicaRectBorderWidth() { return 2; }
SkColor DebugColors::ScreenSpaceSurfaceReplicaRectFillColor() {
return SkColorSetARGB(10, 100, 0, 200);
}
SkColor DebugColors::OccludingRectBorderColor() {
return SkColorSetARGB(255, 245, 136, 255);
}
int DebugColors::OccludingRectBorderWidth() { return 2; }
SkColor DebugColors::OccludingRectFillColor() {
return SkColorSetARGB(10, 245, 136, 255);
}
SkColor DebugColors::NonOccludingRectBorderColor() {
return SkColorSetARGB(255, 200, 0, 100);
}
int DebugColors::NonOccludingRectBorderWidth() { return 2; }
SkColor DebugColors::NonOccludingRectFillColor() {
return SkColorSetARGB(10, 200, 0, 100);
}
SkColor DebugColors::TouchEventHandlerRectBorderColor() {
return SkColorSetARGB(255, 239, 229, 60);
}
int DebugColors::TouchEventHandlerRectBorderWidth() { return 2; }
SkColor DebugColors::TouchEventHandlerRectFillColor() {
return SkColorSetARGB(30, 239, 229, 60);
}
SkColor DebugColors::WheelEventHandlerRectBorderColor() {
return SkColorSetARGB(255, 189, 209, 57);
}
int DebugColors::WheelEventHandlerRectBorderWidth() { return 2; }
SkColor DebugColors::WheelEventHandlerRectFillColor() {
return SkColorSetARGB(30, 189, 209, 57);
}
SkColor DebugColors::ScrollEventHandlerRectBorderColor() {
return SkColorSetARGB(255, 24, 167, 181);
}
int DebugColors::ScrollEventHandlerRectBorderWidth() { return 2; }
SkColor DebugColors::ScrollEventHandlerRectFillColor() {
return SkColorSetARGB(30, 24, 167, 181);
}
SkColor DebugColors::NonFastScrollableRectBorderColor() {
return SkColorSetARGB(255, 238, 163, 59);
}
int DebugColors::NonFastScrollableRectBorderWidth() { return 2; }
SkColor DebugColors::NonFastScrollableRectFillColor() {
return SkColorSetARGB(30, 238, 163, 59);
}
SkColor DebugColors::LayerAnimationBoundsBorderColor() {
return SkColorSetARGB(255, 112, 229, 0);
}
int DebugColors::LayerAnimationBoundsBorderWidth() { return 2; }
SkColor DebugColors::LayerAnimationBoundsFillColor() {
return SkColorSetARGB(30, 112, 229, 0);
}
SkColor DebugColors::NonPaintedFillColor() { return SK_ColorCYAN; }
SkColor DebugColors::MissingPictureFillColor() { return SK_ColorMAGENTA; }
SkColor DebugColors::PictureBorderColor() {
return SkColorSetARGB(100, 0, 0, 200);
}
SkColor DebugColors::HUDBackgroundColor() {
return SkColorSetARGB(215, 17, 17, 17);
}
SkColor DebugColors::HUDSeparatorLineColor() {
return SkColorSetARGB(255, 130, 130, 130);
}
SkColor DebugColors::HUDIndicatorLineColor() {
return SkColorSetARGB(255, 80, 80, 80);
}
SkColor DebugColors::PlatformLayerTreeTextColor() { return SK_ColorRED; }
SkColor DebugColors::FPSDisplayTextAndGraphColor() { return SK_ColorRED; }
SkColor DebugColors::MemoryDisplayTextColor() {
return SkColorSetARGB(255, 220, 220, 220);
}
SkColor DebugColors::PaintTimeDisplayTextAndGraphColor() {
return SkColorSetRGB(75, 155, 55);
}
}