コード例 #1
0
 protected override void initInstances()
 {
     base.initInstances();
     instance       = this;
     _pipelineOwner = new PipelineOwner(
         onNeedVisualUpdate: ensureVisualUpdate
         );
     Window.instance.onMetricsChanged            += handleMetricsChanged;
     Window.instance.onTextScaleFactorChanged    += handleTextScaleFactorChanged;
     Window.instance.onPlatformBrightnessChanged += handlePlatformBrightnessChanged;
     initRenderView();
     D.assert(renderView != null);
     addPersistentFrameCallback(_handlePersistentFrameCallback);
     initMouseTracker();
     window.updateSafeArea();
 }
 public void attach(PipelineOwner owner)
 {
     base.attach(owner);
     _opacity.addListener(_updateOpacity);
     _updateOpacity();
 }