From 926090913bc5b9f5e3c87ec304a6daf364496e03 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 16 Dec 2013 08:46:41 -0600 Subject: [PATCH] Don't skip frames for testing --- src/swf/renderer.js | 5 +++++ test/harness/slave.js | 1 + test/swfs/3_joystick.stas | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/swf/renderer.js b/src/swf/renderer.js index 4464ecfeb..ba781b4a1 100644 --- a/src/swf/renderer.js +++ b/src/swf/renderer.js @@ -27,6 +27,7 @@ var renderAsWireframe = rendererOptions.register(new Option("raw", "renderAsWire var showQuadTree = rendererOptions.register(new Option("qt", "showQuadTree", "boolean", false, "show quad tree")); var turboMode = rendererOptions.register(new Option("", "turbo", "boolean", false, "turbo mode")); var forceHidpi = rendererOptions.register(new Option("", "forceHidpi", "boolean", false, "force hidpi")); +var skipFrameDraw = rendererOptions.register(new Option("", "skipFrameDraw", "boolean", true, "skip frame when not on time")); var enableConstructChildren = rendererOptions.register(new Option("", "constructChildren", "boolean", true, "Construct Children")); @@ -749,6 +750,10 @@ function renderStage(stage, ctx, events) { var frameFPSAverage = new metrics.Average(120); function drawFrame(renderFrame, frameRequested) { + if (!skipFrameDraw.value) { + frameRequested = true; // e.g. for testing we need to draw all frames + } + sampleStart(); var refreshStage = false; diff --git a/test/harness/slave.js b/test/harness/slave.js index 0454f77ce..fdc7ee080 100644 --- a/test/harness/slave.js +++ b/test/harness/slave.js @@ -17,6 +17,7 @@ */ turboMode.value = true; +skipFrameDraw.value = false; function loadMovie(path, reportFrames) { var movieReadyResolve; diff --git a/test/swfs/3_joystick.stas b/test/swfs/3_joystick.stas index 18deb54d5..4a2396db3 100644 --- a/test/swfs/3_joystick.stas +++ b/test/swfs/3_joystick.stas @@ -11,7 +11,7 @@ run_test = function (t, file) { t.mouse_press (initx, inity); t.advance (100); t.mouse_move (initx + delta, inity); - t.advance (1600); + t.advance (1400); t.mouse_release (initx + delta, inity); t.advance (100); var diff = t.trace.diff (expected);