浏览代码

minor fixes

/siyaoH-1.17-PlatformMessage
xingweizhu 4 年前
当前提交
2c55bd54
共有 3 个文件被更改,包括 35 次插入17 次删除
  1. 45
      com.unity.uiwidgets/Runtime/rendering/layer.cs
  2. 2
      com.unity.uiwidgets/Runtime/ui2/compositing.cs
  3. 5
      com.unity.uiwidgets/Runtime/ui2/painting.cs

45
com.unity.uiwidgets/Runtime/rendering/layer.cs


get { return (ContainerLayer) base.parent; }
}
bool _needsAddToScene = true;
public bool _needsAddToScene = true;
if (_needsAddToScene) {
return;
}
_needsAddToScene = true;
}

EngineLayer _engineLayer;
internal virtual void updateSubtreeNeedsAddToScene() {
_subtreeNeedsAddToScene = _needsAddToScene || alwaysNeedsAddToScene;
_needsAddToScene = _needsAddToScene || alwaysNeedsAddToScene;
}
public Layer nextSibling {

internal Layer _previousSibling;
protected override void dropChild(AbstractNodeMixinDiagnosticableTree child) {
markNeedsAddToScene();
if (!alwaysNeedsAddToScene) {
markNeedsAddToScene();
}
markNeedsAddToScene();
if (!alwaysNeedsAddToScene) {
markNeedsAddToScene();
}
base.adoptChild(child);
}

internal abstract void addToScene(SceneBuilder builder, Offset layerOffset = null);
internal void _addToSceneWithRetainedRendering(SceneBuilder builder) {
if (!_subtreeNeedsAddToScene && _engineLayer != null) {
if (!_needsAddToScene && _engineLayer != null) {
builder.addRetained(_engineLayer);
return;
}

Layer child = firstChild;
while (child != null) {
child.updateSubtreeNeedsAddToScene();
_subtreeNeedsAddToScene = _subtreeNeedsAddToScene || child._subtreeNeedsAddToScene;
_needsAddToScene = _needsAddToScene || child._needsAddToScene;
child = child.nextSibling;
}
}

_lastEffectiveTransform.multiply(transform);
}
builder.pushTransform(_lastEffectiveTransform.toMatrix3());
engineLayer = builder.pushTransform(
_lastEffectiveTransform._m4storage,
oldLayer: engineLayer as TransformEngineLayer);
addChildrenToScene(builder);
builder.pop();
}

enabled = !D.debugDisableOpacityLayers;
return true;
});
if (enabled) {
engineLayer = builder.pushOpacity(
alpha,

D.assert(offset != null);
_lastOffset = offset + layerOffset;
if (_lastOffset != Offset.zero) {
builder.pushTransform(new Matrix4()
engineLayer = builder.pushTransform(
new Matrix4()
.toMatrix3());
._m4storage,
oldLayer: engineLayer as TransformEngineLayer);
}
addChildrenToScene(builder, Offset.zero);

_lastTransform = null;
_lastOffset = null;
_inverseDirty = true;
engineLayer = null;
builder.pushTransform(_lastTransform.toMatrix3());
engineLayer = builder.pushTransform(
_lastTransform._m4storage,
oldLayer: engineLayer as TransformEngineLayer);
addChildrenToScene(builder);
builder.pop();
_lastOffset = unlinkedOffset + layerOffset;

var matrix = new Matrix4().translationValues(unlinkedOffset.dx, unlinkedOffset.dy, 0);
builder.pushTransform(matrix.toMatrix3());
engineLayer = builder.pushTransform(
matrix._m4storage,
oldLayer: engineLayer as TransformEngineLayer);
addChildrenToScene(builder);
builder.pop();
}

ancestor = ancestor.parent;
}
return clipPath.transform(matrix.toMatrix3());
return clipPath.transform(matrix._m4storage);
}
}

2
com.unity.uiwidgets/Runtime/ui2/compositing.cs


using System.Collections.Generic;
using System.Runtime.InteropServices;
using AOT;
using JetBrains.Annotations;
using Unity.UIWidgets.widgets;
using UnityEngine;
namespace Unity.UIWidgets.ui {

5
com.unity.uiwidgets/Runtime/ui2/painting.cs


}
PathMetric _pathMetric;
_PathMeasure _pathMeasure;
readonly _PathMeasure _pathMeasure;
public bool MoveNext() {
if (_pathMeasure._nextContour()) {

}
public void Dispose() {
//do nothing
_pathMeasure._dispose();
}
}

public class _PathMeasure : NativeWrapper {
public _PathMeasure(Path path, bool forceClosed) : base(PathMeasure_constructor(path._ptr, forceClosed)) {
}
protected override void DisposePtr(IntPtr ptr) {

正在加载...
取消
保存