void GraphicsLayer::updateDebugIndicators() { if (GraphicsLayer::showDebugBorders()) { if (drawsContent()) { if (m_usingTiledLayer) setDebugBorder(Color(0, 255, 0, 204), 2.0f); // tiled layer: green else setDebugBorder(Color(255, 0, 0, 204), 2.0f); // normal layer: red } else if (masksToBounds()) { setDebugBorder(Color(128, 255, 255, 178), 2.0f); // masking layer: pale blue if (GraphicsLayer::showDebugBorders()) setDebugBackgroundColor(Color(128, 255, 255, 52)); } else setDebugBorder(Color(255, 255, 0, 204), 2.0f); // container: yellow } }
void GraphicsLayer::updateDebugIndicators() { if (GraphicsLayer::showDebugBorders()) { if (drawsContent()) { // FIXME: It's weird to ask the client if this layer is a tile cache layer. // Maybe we should just cache that information inside GraphicsLayer? if (m_client->shouldUseTileCache(this)) // tile cache layer: dark blue setDebugBorder(Color(0, 0, 128, 128), 0.5); else if (m_usingTiledLayer) setDebugBorder(Color(255, 128, 0, 128), 2); // tiled layer: orange else setDebugBorder(Color(0, 128, 32, 128), 2); // normal layer: green } else if (masksToBounds()) { setDebugBorder(Color(128, 255, 255, 48), 20); // masking layer: pale blue } else setDebugBorder(Color(255, 255, 0, 192), 2); // container: yellow } }
void GraphicsLayer::updateDebugIndicators() { if (!isShowingDebugBorder()) return; Color borderColor; float width = 0; getDebugBorderInfo(borderColor, width); setDebugBorder(borderColor, width); }