Merge pull request #1820 from Hixie/rainbox
Expose more debugging tools in Stocks
This commit is contained in:
@@ -57,13 +57,13 @@ int debugPaintPointersColorValue = 0x00BBBB;
|
||||
Color debugErrorBoxColor = const Color(0xFFFF0000);
|
||||
|
||||
/// Overlay a rotating set of colors when repainting layers in checked mode.
|
||||
bool debugEnableRepaintRainbox = false;
|
||||
bool debugRepaintRainbowEnabled = false;
|
||||
|
||||
/// The current color to overlay when repainting a layer.
|
||||
HSVColor debugCurrentRepaintColor = const HSVColor.fromAHSV(0.4, 60.0, 1.0, 1.0);
|
||||
|
||||
/// The amount to increment the hue of the current repaint color.
|
||||
double debugRepaintRainboxHueIncrement = 2.0;
|
||||
double debugRepaintRainbowHueIncrement = 2.0;
|
||||
|
||||
/// Log the call stacks that mark render objects as needing paint.
|
||||
bool debugPrintMarkNeedsPaintStacks = false;
|
||||
|
||||
@@ -159,7 +159,7 @@ class PaintingContext {
|
||||
if (!_isRecording)
|
||||
return;
|
||||
assert(() {
|
||||
if (debugEnableRepaintRainbox)
|
||||
if (debugRepaintRainbowEnabled)
|
||||
canvas.drawRect(_paintBounds, new Paint()..color = debugCurrentRepaintColor.toColor());
|
||||
if (debugPaintLayerBordersEnabled) {
|
||||
Paint paint = new Paint()
|
||||
|
||||
@@ -130,8 +130,8 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
|
||||
ui.window.render(scene);
|
||||
scene.dispose();
|
||||
assert(() {
|
||||
if (debugEnableRepaintRainbox)
|
||||
debugCurrentRepaintColor = debugCurrentRepaintColor.withHue(debugCurrentRepaintColor.hue + debugRepaintRainboxHueIncrement);
|
||||
if (debugRepaintRainbowEnabled)
|
||||
debugCurrentRepaintColor = debugCurrentRepaintColor.withHue(debugCurrentRepaintColor.hue + debugRepaintRainbowHueIncrement);
|
||||
return true;
|
||||
});
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user