Bug 923351. Make layers borders more visible. r=nical

This commit is contained in:
Nicholas Cameron 2013-10-11 06:36:24 +13:00
parent 311bf585b3
commit 8223f8c02e

View File

@ -39,15 +39,23 @@ Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
const gfx::Matrix4x4& aTransform,
const gfx::Point& aOffset)
{
if (!(mDiagnosticTypes & DIAGNOSTIC_TILE_BORDERS) && (aFlags & DIAGNOSTIC_TILE)) {
return;
}
if (!(mDiagnosticTypes & DIAGNOSTIC_LAYER_BORDERS)) {
if ((aFlags & DIAGNOSTIC_TILE) && !(mDiagnosticTypes & DIAGNOSTIC_TILE_BORDERS)) {
return;
}
if ((aFlags & DIAGNOSTIC_BIGIMAGE) && !(mDiagnosticTypes & DIAGNOSTIC_BIGIMAGE_BORDERS)) {
return;
}
if (!mDiagnosticTypes) {
return;
}
#ifdef MOZ_B2G
int lWidth = 4;
#elif defined(ANDROID)
int lWidth = 10;
#else
int lWidth = 2;
#endif
float opacity = 0.7;
gfx::Color color;
@ -57,7 +65,7 @@ Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
color = gfx::Color(0.0, 1.0, 1.0, 1.0); // greenish blue
}
} else if (aFlags & DIAGNOSTIC_IMAGE) {
color = gfx::Color(0.5, 0.0, 0.0, 1.0); // red
color = gfx::Color(1.0, 0.0, 0.0, 1.0); // red
} else if (aFlags & DIAGNOSTIC_COLOR) {
color = gfx::Color(0.0, 0.0, 1.0, 1.0); // blue
} else if (aFlags & DIAGNOSTIC_CONTAINER) {