From: Mark Slee Date: Sat, 9 Nov 2013 03:13:50 +0000 (-0800) Subject: More optimization to unnecessary blending X-Git-Url: https://git.piment-noir.org/?p=SugarCubes.git;a=commitdiff_plain;h=bae2197a9a134bd45f983cd81ceb635d646620e3 More optimization to unnecessary blending --- diff --git a/MarkSlee.pde b/MarkSlee.pde index 88759da..4a37206 100644 --- a/MarkSlee.pde +++ b/MarkSlee.pde @@ -1426,7 +1426,11 @@ class ColorFuckerEffect extends SCEffect { } if (fSharp > 0) { fSharp = 1/(1-fSharp); - hsb[2] = hsb[2] < .5 ? pow(hsb[2],fSharp) : 1-pow(1-hsb[2],fSharp); + if (hsb[2] < .5) { + hsb[2] = pow(hsb[2],fSharp); + } else { + hsb[2] = 1-pow(1-hsb[2],fSharp); + } } if (fSoft > 0) { if (hsb[2] > 0.5) { diff --git a/_Internals.pde b/_Internals.pde index 4716622..728e343 100644 --- a/_Internals.pde +++ b/_Internals.pde @@ -299,16 +299,32 @@ void drawDiagnostics(long drawNanos, long simulationNanos, long uiNanos, long ga noFill(); stroke(#999999); rect(x, y, tw, h); + h = 5; noStroke(); for (long val : new long[] { lx.engine.timer.deckNanos, + lx.engine.timer.copyNanos, lx.engine.timer.fxNanos}) { float amt = val / (float) lx.timer.drawNanos; fill(lx.hsb(hv % 360, 100, 80)); rect(xp, y, amt * tw, h-1); hv += 140; xp += amt * tw; - } + } + + xp = x; + y += h; + hv = 120; + for (long val : new long[] { + lx.engine.getDeck(0).timer.runNanos, + lx.engine.getDeck(1).timer.runNanos, + lx.engine.getDeck(1).getFaderTransition().timer.blendNanos}) { + float amt = val / (float) lx.timer.drawNanos; + fill(lx.hsb(hv % 360, 100, 80)); + rect(xp, y, amt * tw, h-1); + hv += 140; + xp += amt * tw; + } } void drawSimulation(color[] simulationColors) { diff --git a/code/HeronLX.jar b/code/HeronLX.jar index 04fa7fd..396a41e 100755 Binary files a/code/HeronLX.jar and b/code/HeronLX.jar differ