Global Metrics

path: .metrics.mi.mi_original
old: 52.250679222933385
new: 71.8814248084881

path: .metrics.mi.mi_sei
old: 31.97267644698205
new: 62.4619709798029

path: .metrics.mi.mi_visual_studio
old: 30.55595276194935
new: 42.03592094063632

path: .metrics.cyclomatic.average
old: 8.5
new: 1.0

path: .metrics.cyclomatic.sum
old: 17.0
new: 5.0

path: .metrics.nargs.sum
old: 2.0
new: 0.0

path: .metrics.nargs.average
old: 2.0
new: 0.0

path: .metrics.loc.ploc
old: 69.0
new: 32.0

path: .metrics.loc.blank
old: 22.0
new: 11.0

path: .metrics.loc.cloc
old: 20.0
new: 13.0

path: .metrics.loc.lloc
old: 41.0
new: 1.0

path: .metrics.loc.sloc
old: 111.0
new: 56.0

path: .metrics.nexits.average
old: 2.0
new: 1.0

path: .metrics.nexits.sum
old: 2.0
new: 1.0

path: .metrics.halstead.difficulty
old: 19.697674418604652
new: 8.411764705882353

path: .metrics.halstead.purity_ratio
old: 1.0092688498626643
new: 2.2559127850851604

path: .metrics.halstead.volume
old: 1656.5407640227866
new: 544.3497074644085

path: .metrics.halstead.N1
old: 163.0
new: 54.0

path: .metrics.halstead.bugs
old: 0.34037433046676036
new: 0.09191551366674762

path: .metrics.halstead.effort
old: 32630.00063086745
new: 4578.941656906495

path: .metrics.halstead.N2
old: 121.0
new: 44.0

path: .metrics.halstead.estimated_program_length
old: 286.63235336099666
new: 221.07945293834572

path: .metrics.halstead.length
old: 284.0
new: 98.0

path: .metrics.halstead.level
old: 0.05076741440377803
new: 0.11888111888111888

path: .metrics.halstead.time
old: 1812.7778128259697
new: 254.3856476059164

path: .metrics.halstead.n2
old: 43.0
new: 34.0

path: .metrics.halstead.n1
old: 14.0
new: 13.0

path: .metrics.halstead.vocabulary
old: 57.0
new: 47.0

path: .metrics.cognitive.sum
old: 16.0
new: 0.0

path: .metrics.cognitive.average
old: 16.0
new: 0.0

Spaces Data

Minimal test - lines (13, 54)

path: .spaces[0].metrics.halstead.bugs
old: 0.28919792477931355
new: 0.0876541541960691

path: .spaces[0].metrics.halstead.length
old: 259.0
new: 93.0

path: .spaces[0].metrics.halstead.level
old: 0.056603773584905655
new: 0.1183431952662722

path: .spaces[0].metrics.halstead.vocabulary
old: 48.0
new: 43.0

path: .spaces[0].metrics.halstead.n1
old: 12.0
new: 13.0

path: .spaces[0].metrics.halstead.N1
old: 153.0
new: 54.0

path: .spaces[0].metrics.halstead.time
old: 1419.718152729617
new: 236.9016754157024

path: .spaces[0].metrics.halstead.volume
old: 1446.5052876867794
new: 504.6426221872951

path: .spaces[0].metrics.halstead.estimated_program_length
old: 229.1368500605771
new: 195.31243420408975

path: .spaces[0].metrics.halstead.difficulty
old: 17.666666666666668
new: 8.45

path: .spaces[0].metrics.halstead.n2
old: 36.0
new: 30.0

path: .spaces[0].metrics.halstead.N2
old: 106.0
new: 39.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 0.884698262782151
new: 2.1001337011192445

path: .spaces[0].metrics.halstead.effort
old: 25554.926749133105
new: 4264.230157482643

path: .spaces[0].metrics.nargs.sum
old: 2.0
new: 0.0

path: .spaces[0].metrics.nargs.average
old: 2.0
new: 0.0

path: .spaces[0].metrics.loc.cloc
old: 9.0
new: 7.0

path: .spaces[0].metrics.loc.sloc
old: 89.0
new: 42.0

path: .spaces[0].metrics.loc.lloc
old: 41.0
new: 1.0

path: .spaces[0].metrics.loc.ploc
old: 63.0
new: 26.0

path: .spaces[0].metrics.loc.blank
old: 17.0
new: 9.0

path: .spaces[0].metrics.cognitive.average
old: 16.0
new: 0.0

path: .spaces[0].metrics.cognitive.sum
old: 16.0
new: 0.0

path: .spaces[0].metrics.cyclomatic.sum
old: 16.0
new: 4.0

path: .spaces[0].metrics.cyclomatic.average
old: 16.0
new: 1.0

path: .spaces[0].metrics.mi.mi_sei
old: 31.469458017516565
new: 65.58939870414466

path: .spaces[0].metrics.mi.mi_original
old: 56.764180754788214
new: 77.1657295842491

path: .spaces[0].metrics.mi.mi_visual_studio
old: 33.195427341981414
new: 45.12615765160767

path: .spaces[0].metrics.nexits.average
old: 2.0
new: 1.0

path: .spaces[0].metrics.nexits.sum
old: 2.0
new: 1.0

Code

namespace mozilla {
namespace widget {

/**
 * AndroidCompositorWidget inherits from InProcessCompositorWidget because
 * Android does not support OOP compositing yet. Once it does,
 * AndroidCompositorWidget will be made to inherit from CompositorWidget
 * instead.
 */
class AndroidCompositorWidget final : public InProcessCompositorWidget {
 public:
  using InProcessCompositorWidget::InProcessCompositorWidget;

  AndroidCompositorWidget(const layers::CompositorOptions& aOptions,
                          nsBaseWidget* aWidget);

  already_AddRefed StartRemoteDrawingInRegion(
      const LayoutDeviceIntRegion& aInvalidRegion,
      layers::BufferMode* aBufferMode) override;
  void EndRemoteDrawingInRegion(
      gfx::DrawTarget* aDrawTarget,
      const LayoutDeviceIntRegion& aInvalidRegion) override;

  AndroidCompositorWidget* AsAndroid() override { return this; }

  EGLNativeWindowType GetEGLNativeWindow();

  EGLSurface GetPresentationEGLSurface();
  void SetPresentationEGLSurface(EGLSurface aVal);

  ANativeWindow* GetPresentationANativeWindow();

 protected:
  virtual ~AndroidCompositorWidget();

  ANativeWindow* mNativeWindow;
  ANativeWindow_Buffer mBuffer;
  int32_t mFormat;
};

}  // namespace widget
}  // namespace mozilla