Global Metrics
path: .metrics.cyclomatic.sum
old: 8.0
new: 14.0
path: .metrics.cyclomatic.average
old: 1.3333333333333333
new: 1.0769230769230769
path: .metrics.nargs.sum
old: 9.0
new: 0.0
path: .metrics.nargs.average
old: 1.8
new: 0.0
path: .metrics.halstead.time
old: 471.99641743535017
new: 929.7683771320652
path: .metrics.halstead.n1
old: 12.0
new: 17.0
path: .metrics.halstead.effort
old: 8495.935513836303
new: 16735.830788377174
path: .metrics.halstead.length
old: 109.0
new: 224.0
path: .metrics.halstead.volume
old: 499.760912578606
new: 1428.008832621711
path: .metrics.halstead.vocabulary
old: 24.0
new: 83.0
path: .metrics.halstead.N2
old: 34.0
new: 91.0
path: .metrics.halstead.purity_ratio
old: 0.7893495414431904
new: 2.0911467865130073
path: .metrics.halstead.level
old: 0.058823529411764705
new: 0.08532643826761474
path: .metrics.halstead.n2
old: 12.0
new: 66.0
path: .metrics.halstead.N1
old: 75.0
new: 133.0
path: .metrics.halstead.estimated_program_length
old: 86.03910001730775
new: 468.4168801789137
path: .metrics.halstead.bugs
old: 0.13878830873570064
new: 0.21809393884718575
path: .metrics.halstead.difficulty
old: 17.0
new: 11.719696969696969
path: .metrics.mi.mi_visual_studio
old: 46.619581575022174
new: 32.49477749779713
path: .metrics.mi.mi_original
old: 79.71948449328792
new: 55.56606952123309
path: .metrics.mi.mi_sei
old: 74.26026103408647
new: 34.24625013665861
path: .metrics.nom.functions
old: 5.0
new: 6.0
path: .metrics.nom.total
old: 5.0
new: 6.0
path: .metrics.nexits.sum
old: 5.0
new: 6.0
path: .metrics.loc.blank
old: 7.0
new: 21.0
path: .metrics.loc.sloc
old: 34.0
new: 99.0
path: .metrics.loc.cloc
old: 8.0
new: 15.0
path: .metrics.loc.ploc
old: 19.0
new: 63.0
path: .metrics.loc.lloc
old: 5.0
new: 6.0
Spaces Data
Minimal test - lines (20, 20)
path: .spaces[0].metrics.loc.ploc
old: 3.0
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 3.0
new: 1.0
path: .spaces[0].metrics.loc.lloc
old: 1.0
new: 0.0
path: .spaces[0].metrics.halstead.difficulty
old: 10.125
new: 0.0
path: .spaces[0].metrics.halstead.bugs
old: 0.03105406684545678
new: 0.0
path: .spaces[0].metrics.halstead.time
old: 49.955936194904744
new: 0.0
path: .spaces[0].metrics.halstead.volume
old: 88.81055323538621
new: 0.0
path: .spaces[0].metrics.halstead.n2
old: 4.0
new: 1.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.5220552088742003
new: null
path: .spaces[0].metrics.halstead.length
old: 24.0
new: 1.0
path: .spaces[0].metrics.halstead.effort
old: 899.2068515082854
new: 0.0
path: .spaces[0].metrics.halstead.N2
old: 9.0
new: 1.0
path: .spaces[0].metrics.halstead.level
old: 0.09876543209876544
new: null
path: .spaces[0].metrics.halstead.n1
old: 9.0
new: 0.0
path: .spaces[0].metrics.halstead.vocabulary
old: 13.0
new: 1.0
path: .spaces[0].metrics.halstead.N1
old: 15.0
new: 0.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 36.529325012980806
new: null
path: .spaces[0].metrics.cognitive.average
old: 0.0
new: null
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[0].metrics.cyclomatic.average
old: 3.0
new: 1.0
path: .spaces[0].metrics.cyclomatic.sum
old: 3.0
new: 1.0
path: .spaces[0].metrics.nargs.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.nargs.average
old: 1.0
new: null
path: .spaces[0].metrics.nexits.average
old: 1.0
new: null
path: .spaces[0].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.mi.mi_original
old: 129.18265239805245
new: null
path: .spaces[0].metrics.mi.mi_sei
old: 110.97577956975373
new: null
path: .spaces[0].metrics.mi.mi_visual_studio
old: 75.545410759095
new: null
Code
class nsWindow;
Minimal test - lines (22, 97)
path: .spaces[1].metrics.mi.mi_sei
old: 113.30879927065874
new: 38.69363965491067
path: .spaces[1].metrics.mi.mi_original
old: 130.94093072286805
new: 60.83182372422544
path: .spaces[1].metrics.mi.mi_visual_studio
old: 76.57364369758366
new: 35.574165920599675
path: .spaces[1].metrics.nexits.sum
old: 1.0
new: 6.0
path: .spaces[1].metrics.loc.blank
old: 0.0
new: 18.0
path: .spaces[1].metrics.loc.cloc
old: 0.0
new: 9.0
path: .spaces[1].metrics.loc.ploc
old: 3.0
new: 49.0
path: .spaces[1].metrics.loc.sloc
old: 3.0
new: 76.0
path: .spaces[1].metrics.loc.lloc
old: 1.0
new: 6.0
path: .spaces[1].metrics.nargs.average
old: 2.0
new: 0.0
path: .spaces[1].metrics.nargs.sum
old: 2.0
new: 0.0
path: .spaces[1].metrics.halstead.n2
old: 4.0
new: 54.0
path: .spaces[1].metrics.halstead.N2
old: 6.0
new: 78.0
path: .spaces[1].metrics.halstead.level
old: 0.1904761904761905
new: 0.08144796380090497
path: .spaces[1].metrics.halstead.n1
old: 7.0
new: 17.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.3825742227201614
new: 1.8107180638956335
path: .spaces[1].metrics.halstead.vocabulary
old: 11.0
new: 71.0
path: .spaces[1].metrics.halstead.volume
old: 69.18863237274594
new: 1291.446895095983
path: .spaces[1].metrics.halstead.effort
old: 363.2403199569162
new: 15856.097989789574
path: .spaces[1].metrics.halstead.estimated_program_length
old: 27.651484454403228
new: 380.25079341808305
path: .spaces[1].metrics.halstead.N1
old: 14.0
new: 132.0
path: .spaces[1].metrics.halstead.difficulty
old: 5.25
new: 12.27777777777778
path: .spaces[1].metrics.halstead.bugs
old: 0.016969723977179437
new: 0.21038250698204977
path: .spaces[1].metrics.halstead.time
old: 20.180017775384233
new: 880.8943327660875
path: .spaces[1].metrics.halstead.length
old: 20.0
new: 210.0
path: .spaces[1].metrics.cyclomatic.average
old: 1.0
new: 1.0909090909090908
path: .spaces[1].metrics.cyclomatic.sum
old: 1.0
new: 12.0
path: .spaces[1].metrics.nom.functions
old: 1.0
new: 6.0
path: .spaces[1].metrics.nom.total
old: 1.0
new: 6.0
Code
namespace mozilla {
namespace widget {
class PlatformCompositorWidgetDelegate : public CompositorWidgetDelegate {
public:
// Callbacks for nsWindow.
virtual void EnterPresentLock() = 0;
virtual void LeavePresentLock() = 0;
virtual void OnDestroyWindow() = 0;
virtual bool OnWindowResize(const LayoutDeviceIntSize& aSize) = 0;
virtual void OnWindowModeChange(nsSizeMode aSizeMode) = 0;
// Transparency handling.
virtual void UpdateTransparency(nsTransparencyMode aMode) = 0;
virtual void ClearTransparentWindow() = 0;
// CompositorWidgetDelegate Overrides
PlatformCompositorWidgetDelegate* AsPlatformSpecificDelegate() override {
return this;
}
};
class WinCompositorWidgetInitData;
// This is the Windows-specific implementation of CompositorWidget. For
// the most part it only requires an HWND, however it maintains extra state
// for transparent windows, as well as for synchronizing WM_SETTEXT messages
// with the compositor.
class WinCompositorWidget : public CompositorWidget {
public:
WinCompositorWidget(const WinCompositorWidgetInitData& aInitData,
const layers::CompositorOptions& aOptions);
~WinCompositorWidget() override;
// CompositorWidget Overrides
uintptr_t GetWidgetKey() override;
WinCompositorWidget* AsWindows() override { return this; }
HWND GetHwnd() const {
return mCompositorWnds.mCompositorWnd ? mCompositorWnds.mCompositorWnd
: mWnd;
}
HWND GetCompositorHwnd() const { return mCompositorWnds.mCompositorWnd; }
void EnsureCompositorWindow();
void DestroyCompositorWindow();
void UpdateCompositorWndSizeIfNecessary();
void RequestFxrOutput();
bool HasFxrOutputHandler() const { return mFxrHandler != nullptr; }
FxROutputHandler* GetFxrOutputHandler() const { return mFxrHandler.get(); }
virtual bool HasGlass() const = 0;
virtual void UpdateCompositorWnd(const HWND aCompositorWnd,
const HWND aParentWnd) = 0;
virtual void SetRootLayerTreeID(const layers::LayersId& aRootLayerTreeId) = 0;
protected:
bool mSetParentCompleted;
private:
uintptr_t mWidgetKey;
HWND mWnd;
WinCompositorWnds mCompositorWnds;
LayoutDeviceIntSize mLastCompositorWndSize;
UniquePtr mFxrHandler;
};
} // namespace widget
} // namespace mozilla