浏览代码

Merge branch 'siyaoH/skiaBase' into shiyun/skia

/siyaoH-1.17-PlatformMessage
Shiyun Wen 4 年前
当前提交
28175a06
共有 7 个文件被更改,包括 86 次插入58 次删除
  1. 4
      com.unity.uiwidgets/Runtime/rendering/layer.cs
  2. 6
      com.unity.uiwidgets/Runtime/rendering/sliver_multi_box_adaptor.cs
  3. 4
      com.unity.uiwidgets/Runtime/widgets/automatic_keep_alive.cs
  4. 12
      com.unity.uiwidgets/Runtime/widgets/basic.cs
  5. 2
      com.unity.uiwidgets/Runtime/widgets/framework.cs
  6. 57
      com.unity.uiwidgets/Runtime/widgets/sliver.cs
  7. 59
      com.unity.uiwidgets/Runtime/widgets/table.cs

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


internal override void addToScene(SceneBuilder builder, Offset layerOffset = null) {
layerOffset = layerOffset ?? Offset.zero;
bool enabled = true;
bool enabled = firstChild != null;
enabled = !D.debugDisableOpacityLayers;
enabled = enabled && !D.debugDisableOpacityLayers;
return true;
});

6
com.unity.uiwidgets/Runtime/rendering/sliver_multi_box_adaptor.cs


using Unity.UIWidgets.ui;
namespace Unity.UIWidgets.rendering {
public class KeepAliveParentDataMixin : ParentData {
bool keepAlive = false;
bool keptAlive { get; }
}
public interface RenderSliverBoxChildManager {
void createChild(int index, RenderBox after = null);

4
com.unity.uiwidgets/Runtime/widgets/automatic_keep_alive.cs


using System.Collections.Generic;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.scheduler2;
using Unity.UIWidgets.ui;

}
void _updateParentDataOfChild(ParentDataElement childElement) {
//childElement.applyWidgetOutOfTurn((ParentDataWidget<SliverWithKeepAliveWidget>) build(context));
childElement.applyWidgetOutOfTurn((ParentDataWidget)build(context));
childElement.applyWidgetOutOfTurn((ParentDataWidget<KeepAliveParentDataMixin>) build(context));
}
VoidCallback _createCallback(Listenable handle) {

12
com.unity.uiwidgets/Runtime/widgets/basic.cs


}
}
public class Positioned : ParentDataWidget<Stack> {
public class Positioned : ParentDataWidget<StackParentData> {
public Positioned(Widget child, Key key = null, float? left = null, float? top = null,
float? right = null, float? bottom = null, float? width = null, float? height = null) :
base(key, child) {

}
}
public override Type debugTypicalAncestorWidgetClass { get => typeof(Stack); }
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new FloatProperty("left", left, defaultValue: null));

}
}
public class Flexible : ParentDataWidget<Flex> {
public class Flexible : ParentDataWidget<FlexParentData> {
public Flexible(
Key key = null,
int flex = 1,

}
}
}
public override Type debugTypicalAncestorWidgetClass { get => typeof(Flex); }
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);

}
}
public class LayoutId : ParentDataWidget<CustomMultiChildLayout> {
public class LayoutId : ParentDataWidget<MultiChildLayoutParentData> {
public LayoutId(
Key key = null,
object id = null,

}
}
}
public override Type debugTypicalAncestorWidgetClass { get => typeof(CustomMultiChildLayout); }
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);

2
com.unity.uiwidgets/Runtime/widgets/framework.cs


}
}
public abstract class ParentDataWidget<T> : ParentDataWidget where T : RenderObjectWidget {
public abstract class ParentDataWidget<T> : ParentDataWidget where T : ParentData {
public ParentDataWidget(Key key = null, Widget child = null)
: base(key: key, child: child) {
}

57
com.unity.uiwidgets/Runtime/widgets/sliver.cs


public SliverWithKeepAliveWidget(Key key = null) : base(key: key) { }
}
public abstract class SliverMultiBoxAdaptorWidget : RenderObjectWidget {
public abstract class SliverWithKeepAliveWidget : RenderObjectWidget {
/// Initializes fields for subclasses.
public SliverWithKeepAliveWidget(Key key = null) : base(key: key) {
}
public abstract override RenderObject createRenderObject(BuildContext context);
}
public abstract class SliverMultiBoxAdaptorWidget : SliverWithKeepAliveWidget {
protected SliverMultiBoxAdaptorWidget(
Key key = null,
SliverChildDelegate del = null

float trailingScrollOffset
) {
return base.estimateMaxScrollOffset(
constraints,
firstIndex,
lastIndex,
leadingScrollOffset,
trailingScrollOffset
) ?? gridDelegate.getLayout(constraints)
.computeMaxScrollOffset(del.estimatedChildCount ?? 0);
constraints,
firstIndex,
lastIndex,
leadingScrollOffset,
trailingScrollOffset
) ?? gridDelegate.getLayout(constraints)
.computeMaxScrollOffset(del.estimatedChildCount ?? 0);
}
}

_childElements.Remove(index);
}
}
// processElement may modify the Map - need to do a .toList() here.
_childElements.Keys.ToList().ForEach(action: processElement);
if (_didUnderflow) {

}
return widget.estimateMaxScrollOffset(
constraints,
firstIndex,
lastIndex,
leadingScrollOffset,
trailingScrollOffset
) ?? _extrapolateMaxScrollOffset(
firstIndex,
lastIndex,
leadingScrollOffset,
trailingScrollOffset,
childCount.Value
);
constraints,
firstIndex,
lastIndex,
leadingScrollOffset,
trailingScrollOffset
) ?? _extrapolateMaxScrollOffset(
firstIndex,
lastIndex,
leadingScrollOffset,
trailingScrollOffset,
childCount.Value
);
}
public int? childCount {

}
}
public class KeepAlive : ParentDataWidget<SliverMultiBoxAdaptorWidget> {
public class KeepAlive : ParentDataWidget<KeepAliveParentDataMixin> {
public KeepAlive(
Key key = null,
bool keepAlive = true,

return keepAlive;
}
public override Type debugTypicalAncestorWidgetClass {
get => typeof(SliverWithKeepAliveWidget);
}
}
}

59
com.unity.uiwidgets/Runtime/widgets/table.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.foundation;

}
public class TableCell : ParentDataWidget<Table> {
public TableCell(
Key key = null,
TableCellVerticalAlignment? verticalAlignment = null,
Widget child = null
) : base(key: key, child: child) {
this.verticalAlignment = verticalAlignment;
}
public readonly TableCellVerticalAlignment? verticalAlignment;
public override void applyParentData(RenderObject renderObject) {
TableCellParentData parentData = (TableCellParentData) renderObject.parentData;
if (parentData.verticalAlignment != verticalAlignment) {
parentData.verticalAlignment = verticalAlignment;
AbstractNodeMixinDiagnosticableTree targetParent = renderObject.parent;
if (targetParent is RenderObject) {
((RenderObject) targetParent).markNeedsLayout();
}
}
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new EnumProperty<TableCellVerticalAlignment?>("verticalAlignment", verticalAlignment));
}
}
// public class TableCell : ParentDataWidget<Table> {
// public TableCell(
// Key key = null,
// TableCellVerticalAlignment? verticalAlignment = null,
// Widget child = null
// ) : base(key: key, child: child) {
// this.verticalAlignment = verticalAlignment;
// }
//
// public readonly TableCellVerticalAlignment? verticalAlignment;
//
// public override void applyParentData(RenderObject renderObject) {
// TableCellParentData parentData = (TableCellParentData) renderObject.parentData;
// if (parentData.verticalAlignment != verticalAlignment) {
// parentData.verticalAlignment = verticalAlignment;
//
// AbstractNodeMixinDiagnosticableTree targetParent = renderObject.parent;
// if (targetParent is RenderObject) {
// ((RenderObject) targetParent).markNeedsLayout();
// }
// }
// }
//
// public override Type debugTypicalAncestorWidgetClass { get => typeof(Table); }
//
// public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
// base.debugFillProperties(properties);
// properties.add(new EnumProperty<TableCellVerticalAlignment?>("verticalAlignment", verticalAlignment));
// }
// }
}
正在加载...
取消
保存