Engine._measureFps called on skipFrameRender = true

Engine: WebGL2
Version: 8.26.2

Steps to reproduce:

  1. Open playground https://playground.babylonjs.com/#QA1MAG#1
  2. Click “Enable Rendering” checkbox at right-top
  3. Watch the “Last _measureFps called” div

Expected: It does not change when rendering paused
Actual: FPS still measured
98

cc @Evgeni_Popov

Is this breaking anything in the rest of the code ?

Our process loop is something like:

                this.beginFrame();

                // Child canvases
                if (!this.skipFrameRender && !this._renderViews()) {
                    // Main frame
                    this._renderFrame();
                }

                // Present
                this.endFrame();

The “measure fps” code is executed in beginFrame, that’s why it doesn’t stop when skipFrameRender is true. It’s not really a bug, it’s just how skipFrameRender has been implemented. Does this cause a bug in your code that it works this way?

Yeah, this makes measured fps inaccurate when some frame skipped in onBeginFrameObservable