Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (98254 => 98255)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2011-10-24 17:54:40 UTC (rev 98254)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2011-10-24 18:05:57 UTC (rev 98255)
@@ -306,15 +306,13 @@
if (GraphicsLayer::showDebugBorders()) {
if (drawsContent()) {
if (m_usingTiledLayer)
- setDebugBorder(Color(0, 255, 0, 204), 2.0f); // tiled layer: green
+ setDebugBorder(Color(255, 128, 0, 128), 2); // tiled layer: orange
else
- setDebugBorder(Color(255, 0, 0, 204), 2.0f); // normal layer: red
+ setDebugBorder(Color(0, 128, 32, 128), 2); // normal layer: green
} else if (masksToBounds()) {
- setDebugBorder(Color(128, 255, 255, 178), 2.0f); // masking layer: pale blue
- if (GraphicsLayer::showDebugBorders())
- setDebugBackgroundColor(Color(128, 255, 255, 52));
+ setDebugBorder(Color(128, 255, 255, 48), 20); // masking layer: pale blue
} else
- setDebugBorder(Color(255, 255, 0, 204), 2.0f); // container: yellow
+ setDebugBorder(Color(255, 255, 0, 192), 2); // container: yellow
}
}
Modified: trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm (98254 => 98255)
--- trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm 2011-10-24 17:54:40 UTC (rev 98254)
+++ trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm 2011-10-24 18:05:57 UTC (rev 98255)
@@ -87,24 +87,31 @@
char text[16]; // that's a lot of repaints
snprintf(text, sizeof(text), "%d", layerContents->platformCALayerIncrementRepaintCount());
+ CGRect indicatorBox = layerBounds;
+ indicatorBox.size.width = 12 + 10 * strlen(text);
+ indicatorBox.size.height = 27;
CGContextSaveGState(context);
+
+ CGContextSetAlpha(context, 0.5);
+ CGContextBeginTransparencyLayerWithRect(context, indicatorBox, 0);
+
if (isTiledLayer)
- CGContextSetRGBFillColor(context, 0.0f, 1.0f, 0.0f, 0.8f);
+ CGContextSetRGBFillColor(context, 1, 0.5f, 0, 1);
else
- CGContextSetRGBFillColor(context, 1.0f, 0.0f, 0.0f, 0.8f);
+ CGContextSetRGBFillColor(context, 0, 0.5f, 0.25f, 1);
- CGRect aBounds = layerBounds;
-
- aBounds.size.width = 10 + 12 * strlen(text);
- aBounds.size.height = 25;
- CGContextFillRect(context, aBounds);
+ CGContextFillRect(context, indicatorBox);
- CGContextSetRGBFillColor(context, 0.0f, 0.0f, 0.0f, 1.0f);
+ if (platformLayer->acceleratesDrawing())
+ CGContextSetRGBFillColor(context, 1, 0, 0, 1);
+ else
+ CGContextSetRGBFillColor(context, 1, 1, 1, 1);
- CGContextSetTextMatrix(context, CGAffineTransformMakeScale(1.0f, -1.0f));
- CGContextSelectFont(context, "Helvetica", 25, kCGEncodingMacRoman);
- CGContextShowTextAtPoint(context, aBounds.origin.x + 3.0f, aBounds.origin.y + 20.0f, text, strlen(text));
+ CGContextSetTextMatrix(context, CGAffineTransformMakeScale(1, -1));
+ CGContextSelectFont(context, "Helvetica", 22, kCGEncodingMacRoman);
+ CGContextShowTextAtPoint(context, indicatorBox.origin.x + 5, indicatorBox.origin.y + 22, text, strlen(text));
+ CGContextEndTransparencyLayer(context);
CGContextRestoreGState(context);
}