浏览代码

Merge branch 'shiyun/skia' into shiyun/cupertino/skia

/siyaoH-1.17-PlatformMessage
Shiyun Wen 4 年前
当前提交
92a5c608
共有 18 个文件被更改,包括 427 次插入97 次删除
  1. 4
      com.unity.uiwidgets/Runtime/cupertino/text_selection.cs
  2. 2
      com.unity.uiwidgets/Runtime/cupertino/text_theme.cs
  3. 2
      com.unity.uiwidgets/Runtime/painting/alignment.cs
  4. 12
      com.unity.uiwidgets/Runtime/painting/text_painter.cs
  5. 5
      com.unity.uiwidgets/Runtime/rendering/debug.cs
  6. 2
      com.unity.uiwidgets/Runtime/rendering/image.cs
  7. 10
      com.unity.uiwidgets/Runtime/rendering/layer.cs
  8. 414
      com.unity.uiwidgets/Runtime/rendering/paragraph.cs
  9. 1
      com.unity.uiwidgets/Runtime/rendering/shifted_box.cs
  10. 18
      com.unity.uiwidgets/Runtime/ui2/compositing.cs
  11. 4
      com.unity.uiwidgets/Runtime/widgets/app.cs
  12. 8
      com.unity.uiwidgets/Runtime/widgets/basic.cs
  13. 6
      com.unity.uiwidgets/Runtime/widgets/editable_text.cs
  14. 10
      com.unity.uiwidgets/Runtime/widgets/fade_in_image.cs
  15. 4
      com.unity.uiwidgets/Runtime/widgets/image.cs
  16. 2
      com.unity.uiwidgets/Runtime/widgets/text_selection.cs
  17. 6
      com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs
  18. 14
      engine/src/lib/ui/compositing/scene_builder.cc

4
com.unity.uiwidgets/Runtime/cupertino/text_selection.cs


);
}
public override Size handleSize {
get { return CupertinoTextSelectionUtils._kSelectionOffset; }
}
public override Offset getHandleAnchor(TextSelectionHandleType type, float textLineHeight) {
Size handleSize = getHandleSize(textLineHeight);
switch (type) {

2
com.unity.uiwidgets/Runtime/cupertino/text_theme.cs


TextStyle pickerTextStyle = null,
TextStyle dateTimePickerTextStyle = null
) {
D.assert((_navActionTextStyle != null && _actionTextStyle != null) || _primaryColor != null);
D.assert((_navActionTextStyle != null && _actionTextStyle != null) || _primaryColor != null);
_textStyle = textStyle;
_actionTextStyle = actionTextStyle;
_tabLabelTextStyle = tabLabelTextStyle;

2
com.unity.uiwidgets/Runtime/painting/alignment.cs


}
public override Alignment resolve(TextDirection? direction) {
D.assert(direction != null);
direction = direction ?? TextDirection.ltr;
switch (direction) {
case TextDirection.rtl:
return new Alignment(_x - _start, _y);

12
com.unity.uiwidgets/Runtime/painting/text_painter.cs


}
}
public List<TextBox> inlinePlaceholderBoxes {
get {
return _inlinePlaceholderBoxes;
}
}
List<float> inlinePlaceholderScales {
get { return _inlinePlaceholderScales; }
public List<float> inlinePlaceholderScales {
get {
return _inlinePlaceholderScales;
}
}
List<float> _inlinePlaceholderScales;

5
com.unity.uiwidgets/Runtime/rendering/debug.cs


using Unity.UIWidgets.painting;
public static bool debugRepaintTextRainbowEnabled = false;
static readonly HSVColor _kDebugDefaultRepaintColor = HSVColor.fromAHSV(0.4f, 60.0f, 1.0f, 1.0f);
public static HSVColor debugCurrentRepaintColor = _kDebugDefaultRepaintColor;
}
}

2
com.unity.uiwidgets/Runtime/rendering/image.cs


properties.add(new DiagnosticsProperty<bool>("invertColors", invertColors));
properties.add(new EnumProperty<FilterQuality>("filterMode", filterQuality));
properties.add(new FlagProperty("matchTextDirection", value: matchTextDirection, ifTrue: "match text direction"));
properties.add(new EnumProperty<TextDirection>("textDirection", (TextDirection)textDirection, defaultValue: null));
properties.add(new EnumProperty<TextDirection?>("textDirection", textDirection, defaultValue: null));
}
}

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


ColorFilter _colorFilter;
//[!!!]builder.pushColorFilter?
/*public override void addToScene(ui.SceneBuilder builder, Offset layerOffset = null ) {
public override void addToScene(ui.SceneBuilder builder, Offset layerOffset = null ) {
D.assert(colorFilter != null);
engineLayer = builder.pushColorFilter(
colorFilter,

builder.pop();
}*/
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);

ui.ImageFilter _imageFilter;
//[!!!] builder.pushImageFilter?
/*public override void addToScene(ui.SceneBuilder builder, Offset layerOffset = null) {
public override void addToScene(ui.SceneBuilder builder, Offset layerOffset = null) {
D.assert(imageFilter != null);
engineLayer = builder.pushImageFilter(
imageFilter,

builder.pop();
}*/
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);

414
com.unity.uiwidgets/Runtime/rendering/paragraph.cs


namespace Unity.UIWidgets.rendering {
public enum TextOverflow {
/// Clip the overflowing text to fix its container.
/// Fade the overflowing text to transparent.
/// Use an ellipsis to indicate that the text has overflowed.
/// Render overflowing text outside of its container.
visible,
visible
public class RenderParagraph : RenderBox{
// ContainerRenderObjectMixin<RenderBox, TextParentData>,
//RenderBoxContainerDefaultsMixin<RenderBox, TextParentData>,
//RelayoutWhenSystemFontsChangeMixin
public class TextParentData : ContainerBoxParentData<RenderBox> {
public float scale;
public override string ToString() {
List<string> values = new List<string>();
if (offset != null) values.Add("offset=$offset");
if (scale != null) values.Add("scale=$scale");
values.Add(base.ToString());
return string.Join("; ", values);
}
}
public class RenderParagraph : RenderBoxContainerDefaultsMixinContainerRenderObjectMixinRenderBox<RenderBox, TextParentData> {
static readonly string _kEllipsis = "\u2026";
bool _softWrap;

public RenderParagraph(
InlineSpan text = null,
TextAlign textAlign = TextAlign.left,
TextAlign textAlign = TextAlign.start,
TextDirection textDirection = TextDirection.ltr,
bool softWrap = true,
TextOverflow overflow = TextOverflow.clip,

TextWidthBasis textWidthBasis = TextWidthBasis.parent,
ui.TextHeightBehavior textHeightBehavior = null,
List<RenderBox> children = null
//Action onSelectionChanged = null,
//Color selectionColor = null
D.assert(textAlign != null);
D.assert(textDirection != null);
D.assert(softWrap != null);
D.assert(overflow != null);
D.assert(textScaleFactor != null);
D.assert(textWidthBasis != null);
_softWrap = softWrap;
_overflow = overflow;
_textPainter = new TextPainter(

textWidthBasis: textWidthBasis,
textHeightBehavior: textHeightBehavior
);
_selection = null;
this.onSelectionChanged = onSelectionChanged;
this.selectionColor = selectionColor;
//addAll(children);
//addAll(children);[!!!]?
//_resetHoverHandler();
public override void setupParentData(RenderObject child) {
if (!(child.parentData is TextParentData))
child.parentData = new TextParentData();
}
public Action onSelectionChanged;
public Color selectionColor;

_textPainter.text = value;
_extractPlaceholderSpans(value);
markNeedsPaint();
//markNeedsSemanticsUpdate();
break;
case RenderComparison.layout:
_textPainter.text = value;

break;
/*case RenderComparison.function:
_textPainter.text = value;
markNeedsPaint();
break;
case RenderComparison.paint:
_textPainter.text = value;
markNeedsPaint();
break;
case RenderComparison.layout:
_textPainter.text = value;
markNeedsLayout();
break;*/
}

}
public TextAlign textAlign {
get { return _textPainter.textAlign; }
get { return _textPainter.textAlign.Value; }
set {
if (_textPainter.textAlign == value) {
return;

return;
}
_textPainter.textDirection = textDirection;
_textPainter.textDirection = value;
markNeedsLayout();
}
}

return _textPainter.getOffsetForCaret(position, caretPrototype);
}
List<ui.TextBox> getBoxesForSelection(TextSelection selection) {
D.assert(!debugNeedsLayout);
_layoutTextWithConstraints(constraints);
return _textPainter.getBoxesForSelection(selection);
}
TextPosition getPositionForOffset(Offset offset) {
D.assert(!debugNeedsLayout);
_layoutTextWithConstraints(constraints);
return _textPainter.getPositionForOffset(offset);
}
TextRange getWordBoundary(TextPosition position) {
D.assert(!debugNeedsLayout);
_layoutTextWithConstraints(constraints);
return _textPainter.getWordBoundary(position);
}
public bool softWrap {
get { return _softWrap; }

_overflow = value;
_textPainter.ellipsis = value == TextOverflow.ellipsis ? _kEllipsis : null;
// _textPainter.e
markNeedsLayout();
}
}

}
_textPainter.textScaleFactor = value;
_overflowShader = null;
markNeedsLayout();
}
}

}
_textPainter.maxLines = value;
_overflowShader = null;
markNeedsLayout();
}
}

public TextWidthBasis textWidthBasis {
get { return _textPainter.textWidthBasis; }
set {
D.assert(value != null);
if (_textPainter.textWidthBasis == value)
return;
_textPainter.textWidthBasis = value;

}
protected internal override float computeMinIntrinsicWidth(float height) {
_layoutText();
if (!_canComputeIntrinsics()) {
return 0.0f;
}
_computeChildrenWidthWithMinIntrinsics(height);
_layoutText(); // layout with infinite width.
_layoutText();
if (!_canComputeIntrinsics()) {
return 0.0f;
}
_computeChildrenWidthWithMaxIntrinsics(height);
_layoutText(); // layout with infinite width.
if (!_canComputeIntrinsics()) {
return 0.0f;
}
_computeChildrenHeightWithMinIntrinsics(width);
_layoutText(minWidth: width, maxWidth: width);
return _textPainter.height;
}

}
protected override float? computeDistanceToActualBaseline(TextBaseline baseline) {
D.assert(!debugNeedsLayout);
D.assert(constraints != null);
D.assert(constraints.debugAssertIsValid());
return _textPainter.computeDistanceToActualBaseline(baseline);
return _textPainter.computeDistanceToActualBaseline(TextBaseline.alphabetic);
}
bool _canComputeIntrinsics() {
foreach (PlaceholderSpan span in _placeholderSpans) {
switch (span.alignment) {
case ui.PlaceholderAlignment.baseline:
case ui.PlaceholderAlignment.aboveBaseline:
case ui.PlaceholderAlignment.belowBaseline: {
D.assert(RenderObject.debugCheckingIntrinsics,
() => "Intrinsics are not available for PlaceholderAlignment.baseline, " +
"PlaceholderAlignment.aboveBaseline, or PlaceholderAlignment.belowBaseline,");
return false;
}
case ui.PlaceholderAlignment.top:
case ui.PlaceholderAlignment.middle:
case ui.PlaceholderAlignment.bottom: {
continue;
}
}
}
return true;
}
void _computeChildrenWidthWithMaxIntrinsics(float height) {
RenderBox child = firstChild;
List<PlaceholderDimensions> placeholderDimensions = new List<PlaceholderDimensions>(childCount);
int childIndex = 0;
while (child != null) {
placeholderDimensions[childIndex] = new PlaceholderDimensions(
size: new Size(child.getMaxIntrinsicWidth(height), height),
alignment: _placeholderSpans[childIndex].alignment,
baseline: _placeholderSpans[childIndex].baseline.Value,
baselineOffset:0.0f
);
child = childAfter(child);
childIndex += 1;
}
_textPainter.setPlaceholderDimensions(placeholderDimensions);
}
void _computeChildrenWidthWithMinIntrinsics(float height) {
RenderBox child = firstChild;
List<PlaceholderDimensions> placeholderDimensions = new List<PlaceholderDimensions>(childCount);
int childIndex = 0;
while (child != null) {
float intrinsicWidth = child.getMinIntrinsicWidth(height);
float intrinsicHeight = child.getMinIntrinsicHeight(intrinsicWidth);
placeholderDimensions[childIndex] = new PlaceholderDimensions(
size: new Size(intrinsicWidth, intrinsicHeight),
alignment: _placeholderSpans[childIndex].alignment,
baseline: _placeholderSpans[childIndex].baseline.Value,
baselineOffset:0.0f
);
child = childAfter(child);
childIndex += 1;
}
_textPainter.setPlaceholderDimensions(placeholderDimensions);
void _computeChildrenHeightWithMinIntrinsics(float width) {
RenderBox child = firstChild;
List<PlaceholderDimensions> placeholderDimensions = new List<PlaceholderDimensions>(childCount);
int childIndex = 0;
while (child != null) {
float intrinsicHeight = child.getMinIntrinsicHeight(width);
float intrinsicWidth = child.getMinIntrinsicWidth(intrinsicHeight);
placeholderDimensions[childIndex] = new PlaceholderDimensions(
size: new Size(intrinsicWidth, intrinsicHeight),
alignment: _placeholderSpans[childIndex].alignment,
baseline: _placeholderSpans[childIndex].baseline.Value,
baselineOffset:0.0f
);
child = childAfter(child);
childIndex += 1;
}
_textPainter.setPlaceholderDimensions(placeholderDimensions);
}
protected override bool hitTestChildren(BoxHitTestResult boxHitTestResult, Offset position = null) {
RenderBox child = firstChild;
while (child != null) {
TextParentData textParentData = child.parentData as TextParentData;
Matrix4 transform = Matrix4.translationValues(
textParentData.offset.dx,
textParentData.offset.dy,
0.0f
);
transform.scale(
textParentData.scale,
textParentData.scale,
textParentData.scale
);
bool isHit = boxHitTestResult.addWithPaintTransform(
transform: transform,
position: position,
hitTest: (BoxHitTestResult result, Offset transformed) => {
D.assert(() => {
Offset manualPosition = (position - textParentData.offset) / textParentData.scale;
return (transformed.dx - manualPosition.dx).abs() < foundation_.precisionErrorTolerance
&& (transformed.dy - manualPosition.dy).abs() < foundation_.precisionErrorTolerance;
});
return child.hitTest(result, position: transformed);
}
);
if (isHit) {
return true;
}
child = childAfter(child);
}
return false;
}
bool _hasFocus = false;
bool _listenerAttached = false;

Offset offset = ((BoxHitTestEntry) entry).localPosition;
TextPosition position = _textPainter.getPositionForOffset(offset);
InlineSpan span = _textPainter.text.getSpanForPosition(position);
(span as TextSpan)?.recognizer?.addPointer((PointerDownEvent) evt);
if (span == null) {
return;
}
if (span is TextSpan) {
TextSpan textSpan = (TextSpan)span;
textSpan.recognizer?.addPointer(evt as PointerDownEvent);
}
}
bool debugHasOverflowShader {
get { return _overflowShader != null; }
void _layoutChildren(BoxConstraints constraints) {
if (childCount == 0) {
return;
}
RenderBox child = firstChild;
_placeholderDimensions = new List<PlaceholderDimensions>(childCount);
int childIndex = 0;
while (child != null) {
child.layout(
new BoxConstraints(
maxWidth: constraints.maxWidth
),
parentUsesSize: true
);
float baselineOffset;
switch (_placeholderSpans[childIndex].alignment) {
case ui.PlaceholderAlignment.baseline: {
baselineOffset = child.getDistanceToBaseline(
_placeholderSpans[childIndex].baseline.Value
).Value;
break;
}
default: {
baselineOffset = 0.0f;
break;
}
}
_placeholderDimensions[childIndex] = new PlaceholderDimensions(
size: child.size,
alignment: _placeholderSpans[childIndex].alignment,
baseline: _placeholderSpans[childIndex].baseline.Value,
baselineOffset: baselineOffset
);
child = childAfter(child);
childIndex += 1;
}
}
void _setParentData() {
RenderBox child = firstChild;
int childIndex = 0;
while (child != null && childIndex < _textPainter.inlinePlaceholderBoxes.Count) {
TextParentData textParentData = child.parentData as TextParentData;
textParentData.offset = new Offset(
_textPainter.inlinePlaceholderBoxes[childIndex].left,
_textPainter.inlinePlaceholderBoxes[childIndex].top
);
textParentData.scale = _textPainter.inlinePlaceholderScales[childIndex];
child = childAfter(child);
childIndex += 1;
}
}
BoxConstraints constraints = this.constraints;
_layoutChildren(constraints);
_setParentData();
var textSize = _textPainter.size;
var textDidExceedMaxLines = _textPainter.didExceedMaxLines;
size = constraints.constrain(textSize);

var hasVisualOverflow = didOverflowWidth || didOverflowHeight;
if (hasVisualOverflow) {
/*switch (_overflow) {
case TextOverflow.visible:
_needsClipping = false;
break;
case TextOverflow.clip:
case TextOverflow.ellipsis:
case TextOverflow.fade:
_needsClipping = true;
break;
}*/
case TextOverflow.visible:
_needsClipping = false;
break;
case TextOverflow.clip:
case TextOverflow.ellipsis:
case TextOverflow.fade:
_needsClipping = true;
break;
case TextOverflow.visible:
_needsClipping = false;
_overflowShader = null;
break;
case TextOverflow.clip:
case TextOverflow.ellipsis:
_needsClipping = true;
_overflowShader = null;
break;
case TextOverflow.fade:
D.assert(textDirection != null);
_needsClipping = true;
TextPainter fadeSizePainter = new TextPainter(
text: new TextSpan(style: _textPainter.text.style, text: "\u2026"),
textDirection: textDirection.Value,
textScaleFactor: textScaleFactor,
locale: locale
);
fadeSizePainter.layout();
if (didOverflowWidth) {
float fadeEnd = 0, fadeStart = 0;
switch (textDirection) {
case TextDirection.rtl:
fadeEnd = 0.0f;
fadeStart = fadeSizePainter.width;
break;
case TextDirection.ltr:
fadeEnd = size.width;
fadeStart = fadeEnd - fadeSizePainter.width;
break;
}
_overflowShader = ui.Gradient.linear(
new Offset(fadeStart, 0.0f),
new Offset(fadeEnd, 0.0f),
new List<Color>{new Color(0xFFFFFFFF), new Color(0x00FFFFFF)}
);
} else {
float fadeEnd = size.height;
float fadeStart = fadeEnd - fadeSizePainter.height / 2.0f;
_overflowShader = ui.Gradient.linear(
new Offset(0.0f, fadeStart),
new Offset(0.0f, fadeEnd),
new List<Color> {new Color(0xFFFFFFFF), new Color(0x00FFFFFF)}
);
}
break;
_overflowShader = null;
_selectionRects = null;
void paintParagraph(PaintingContext context, Offset offset) {
/*void paintParagraph(PaintingContext context, Offset offset) {
_layoutTextWithConstraints(constraints);
var canvas = context.canvas;

else {
paintParagraph(context, offset);
}
} */
public override void paint(PaintingContext context2, Offset offset2) {
_layoutTextWithConstraints(constraints);
D.assert(() => {
if (RenderingDebugUtils.debugRepaintTextRainbowEnabled) {
Paint paint = new Paint();
paint.color = RenderingDebugUtils.debugCurrentRepaintColor.toColor();
context2.canvas.drawRect(offset2 & size, paint);
}
return true;
});
if (_needsClipping) {
Rect bounds = offset2 & size;
if (_overflowShader != null) {
context2.canvas.saveLayer(bounds, new Paint());
} else {
context2.canvas.save();
}
context2.canvas.clipRect(bounds);
}
_textPainter.paint(context2.canvas, offset2);
RenderBox child = firstChild;
int childIndex = 0;
while (child != null && childIndex < _textPainter.inlinePlaceholderBoxes.Count) {
TextParentData textParentData = child.parentData as TextParentData;
float scale = textParentData.scale;
context2.pushTransform(
needsCompositing,
offset2 + textParentData.offset,
Matrix4.diagonal3Values(scale, scale, scale),
(PaintingContext context, Offset offset) => {
context.paintChild(
child,
offset
);
}
);
child = childAfter(child);
childIndex += 1;
}
if (_needsClipping) {
if (_overflowShader != null) {
context2.canvas.translate(offset2.dx, offset2.dy);
Paint paint = new Paint();
paint.blendMode = BlendMode.modulate;
paint.shader = _overflowShader;
context2.canvas.drawRect(Offset.zero & size, paint);
}
context2.canvas.restore();
}
}

_textPainter.layout(minWidth, widthMatters ? maxWidth : float.PositiveInfinity);
}
List<PlaceholderDimensions> _placeholderDimensions;
_textPainter.setPlaceholderDimensions(_placeholderDimensions);
_layoutText(minWidth: constraints.minWidth, maxWidth: constraints.maxWidth);
}

ifFalse: "no wrapping except at line break characters", showName: true));
properties.add(new EnumProperty<TextOverflow>("overflow", overflow));
properties.add(new FloatProperty("textScaleFactor", textScaleFactor, defaultValue: 1.0f));
properties.add(new DiagnosticsProperty<Locale>("locale", locale, defaultValue: null));
properties.add(new IntProperty("maxLines", maxLines, ifNull: "unlimited"));
}
}

1
com.unity.uiwidgets/Runtime/rendering/shifted_box.cs


TextDirection? _textDirection;
protected void alignChild() {
_resolve();
D.assert(child != null);
D.assert(!child.debugNeedsLayout);
D.assert(child.hasSize);

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


return layer;
}
public ColorFilterEngineLayer pushColorFilter(ColorFilter colorFilter, ColorFilterEngineLayer oldLayer = null) {
D.assert(_debugCheckCanBeUsedAsOldLayer(oldLayer, "pushColorFilter"));
ColorFilterEngineLayer layer = new ColorFilterEngineLayer(SceneBuilder_pushColorFilter(_ptr, colorFilter._toNativeColorFilter()._ptr));
return layer;
}
public ImageFilterEngineLayer pushImageFilter(ImageFilter imageFilter, ImageFilterEngineLayer oldLayer = null) {
D.assert(_debugCheckCanBeUsedAsOldLayer(oldLayer, "pushImageFilter"));
ImageFilterEngineLayer layer = new ImageFilterEngineLayer(SceneBuilder_pushImageFilter(_ptr, imageFilter._toNativeImageFilter()._ptr));
return layer;
}
public BackdropFilterEngineLayer pushBackdropFilter(
ImageFilter filter,
BackdropFilterEngineLayer oldLayer = null) {

[DllImport(NativeBindings.dllName)]
static extern IntPtr SceneBuilder_pushOpacity(IntPtr ptr, int alpha, float dx, float dy);
[DllImport(NativeBindings.dllName)]
static extern IntPtr SceneBuilder_pushColorFilter(IntPtr ptr, IntPtr filter);
[DllImport(NativeBindings.dllName)]
static extern IntPtr SceneBuilder_pushImageFilter(IntPtr ptr, IntPtr filter);
[DllImport(NativeBindings.dllName)]
static extern IntPtr SceneBuilder_pushBackdropFilter(IntPtr ptr, IntPtr filter);

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


return Future.value(true).to<bool>();
}
public void didChangeAccessibilityFeatures() {
}
public void didChangeAccessibilityFeatures() {}
Route<object> _onUnknownRoute(RouteSettings settings) {
D.assert(() => {

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


}
public PointerExitEventListener getHandleExit() {
return widget.onExit == null ? (PointerExitEventListener) null : handleExit;
return widget.onExit == null ? (PointerExitEventListener) null : handleExit;
}
public override Widget build(BuildContext context) {
return new _RawMouseRegion(this);

public class _RawMouseRegion : SingleChildRenderObjectWidget {
public _RawMouseRegion(_MouseRegionState owner) : base(child: owner.widget.child)
{
public _RawMouseRegion(_MouseRegionState owner) : base(child: owner.widget.child) {
this.owner = owner;
public override RenderObject createRenderObject(BuildContext context) {
public override RenderObject createRenderObject(BuildContext context) {
MouseRegion widget = owner.widget;
return new RenderMouseRegion(
onEnter: widget.onEnter,

6
com.unity.uiwidgets/Runtime/widgets/editable_text.cs


return Future.value(false).to<bool>();
}
public void didChangeAccessibilityFeatures() {
}
public void didChangeAccessibilityFeatures() {}
void _formatAndSetValue(TextEditingValue value, bool isIMEInput = false) {
var textChanged = _value?.text != value?.text || isIMEInput;

10
com.unity.uiwidgets/Runtime/widgets/fade_in_image.cs


weight: (float) widget.fadeInDuration?.Milliseconds
));
//[!!!] drive
/*_placeholderOpacityAnimation = animation.drive(list).addStatusListener((AnimationStatus status) =>{
_placeholderOpacityAnimation = animation.drive(new TweenSequence<float>(list));
_placeholderOpacityAnimation.addStatusListener((AnimationStatus status) =>{
// Need to rebuild to remove placeholder now that it is invisibile.
});*/
});
List<TweenSequenceItem<float>> list2 = new List<TweenSequenceItem<float>>();
list2.Add(new TweenSequenceItem<float>(

tween: _targetOpacity.chain(new CurveTween(curve: widget.fadeInCurve)),
weight: (float) widget.fadeInDuration?.Milliseconds
));
//_targetOpacityAnimation = animation.drive(list2);[!!!] animation.cs drive
_targetOpacityAnimation = animation.drive(new TweenSequence<float>(list2));
if (!widget.isTargetLoaded && _isValid(_placeholderOpacity) && _isValid(_targetOpacity)) {
controller.setValue(controller.upperBound);
}

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


}
void _resolveImage() {
ScrollAwareImageProvider<object> provider = new ScrollAwareImageProvider<object>(
/*ScrollAwareImageProvider<object> provider = new ScrollAwareImageProvider<object>(
);
);*/
ImageStream newStream =
widget.image.resolve(ImageUtils.createLocalImageConfiguration(
context,

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


);
public abstract Size getHandleSize(float textLineHeight);
public abstract Size handleSize { get; }// [!!!]useless?
public virtual bool canCut(TextSelectionDelegate _delegate) {
return _delegate.cutEnabled && !_delegate.textEditingValue.selection.isCollapsed;
}

6
com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs


return Future.value(false).to<bool>();
}
public void didChangeAccessibilityFeatures() {
}
public void didChangeAccessibilityFeatures() {}
void _selectionChangedCallback() {
setState(() => { });

14
engine/src/lib/ui/compositing/scene_builder.cc


}
UIWIDGETS_API(EngineLayer*)
SceneBuilder_pushColorFilter(SceneBuilder* ptr, ColorFilter* filter) {
const auto layer = ptr->pushColorFilter(filter);
layer->AddRef();
return layer.get();
}
UIWIDGETS_API(EngineLayer*)
SceneBuilder_pushImageFilter(SceneBuilder* ptr, ImageFilter* filter) {
const auto layer = ptr->pushImageFilter(filter);
layer->AddRef();
return layer.get();
}
UIWIDGETS_API(EngineLayer*)
SceneBuilder_pushBackdropFilter(SceneBuilder* ptr, ImageFilter* filter) {
const auto layer = ptr->pushBackdropFilter(filter);
layer->AddRef();

正在加载...
取消
保存