Browse Source

Merge branch 'master' into TextDoubleClickSelect

pull/9861/head
Max Katz 3 years ago
committed by GitHub
parent
commit
da97ed8dce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      azure-pipelines-integrationtests.yml
  2. 24
      azure-pipelines.yml
  3. 2
      global.json
  4. 2
      samples/ControlCatalog/Pages/DateTimePickerPage.xaml.cs
  5. 2
      src/Avalonia.Base/Rendering/Composition/Compositor.cs
  6. 4
      src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawListVisual.cs
  7. 6
      src/Avalonia.Base/Rendering/Composition/Server/ServerCustomCompositionVisual.cs
  8. 4
      src/Avalonia.Base/Rendering/Composition/Server/ServerList.cs
  9. 8
      src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs
  10. 2
      src/Avalonia.Base/Rendering/Composition/Transport/Batch.cs
  11. 4
      src/Avalonia.Controls/BorderVisual.cs
  12. 2
      src/tools/DevAnalyzers/GenericVirtualAnalyzer.cs
  13. 6
      src/tools/DevGenerators/CompositionGenerator/Generator.cs

16
azure-pipelines-integrationtests.yml

@ -13,14 +13,14 @@ jobs:
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.401'
displayName: 'Use .NET Core SDK 6.0.404'
inputs:
version: 6.0.401
version: 6.0.404
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 7.0.100'
displayName: 'Use .NET Core SDK 7.0.101'
inputs:
version: 7.0.100
version: 7.0.101
- script: system_profiler SPDisplaysDataType |grep Resolution
@ -51,14 +51,14 @@ jobs:
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.401'
displayName: 'Use .NET Core SDK 6.0.404'
inputs:
version: 6.0.401
version: 6.0.404
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 7.0.100'
displayName: 'Use .NET Core SDK 7.0.101'
inputs:
version: 7.0.100
version: 7.0.101
- task: Windows Application Driver@0
inputs:

24
azure-pipelines.yml

@ -30,14 +30,14 @@ jobs:
vmImage: 'ubuntu-20.04'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.401'
displayName: 'Use .NET Core SDK 6.0.404'
inputs:
version: 6.0.401
version: 6.0.404
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 7.0'
displayName: 'Use .NET Core SDK 7.0.101'
inputs:
version: 7.0.100
version: 7.0.101
- task: CmdLine@2
displayName: 'Install Workloads'
@ -67,14 +67,14 @@ jobs:
vmImage: 'macos-12'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.401'
displayName: 'Use .NET Core SDK 6.0.404'
inputs:
version: 6.0.401
version: 6.0.404
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 7.0.100'
displayName: 'Use .NET Core SDK 7.0.101'
inputs:
version: 7.0.100
version: 7.0.101
- task: CmdLine@2
displayName: 'Install Workloads'
@ -138,14 +138,14 @@ jobs:
SolutionDir: '$(Build.SourcesDirectory)'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.401'
displayName: 'Use .NET Core SDK 6.0.404'
inputs:
version: 6.0.401
version: 6.0.404
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 7.0.100'
displayName: 'Use .NET Core SDK 7.0.101'
inputs:
version: 7.0.100
version: 7.0.101
- task: CmdLine@2
displayName: 'Install Workloads'

2
global.json

@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"version": "7.0.101",
"rollForward": "latestFeature"
},
"msbuild-sdks": {

2
samples/ControlCatalog/Pages/DateTimePickerPage.xaml.cs

@ -17,7 +17,7 @@ namespace ControlCatalog.Pages
this.Get<TextBlock>("TimePickerDesc").Text = "Use a TimePicker to let users set a time in your app, for example " +
"to set a reminder. The TimePicker displays three controls for hour, minute, and AM / PM(if necessary).These controls " +
"are easy to use with touch or mouse, and they can be styled and configured in several different ways. " +
"12 - hour or 24 - hour clock and visiblility of AM / PM is dynamically set based on user time settings, or can be overridden.";
"12 - hour or 24 - hour clock and visibility of AM / PM is dynamically set based on user time settings, or can be overridden.";
}

2
src/Avalonia.Base/Rendering/Composition/Compositor.cs

@ -111,7 +111,7 @@ namespace Avalonia.Rendering.Composition
}
}
batch.CommitedAt = Server.Clock.Elapsed;
batch.CommittedAt = Server.Clock.Elapsed;
_server.EnqueueBatch(batch);
lock (_pendingBatchLock)

4
src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawListVisual.cs

@ -48,7 +48,7 @@ internal class ServerCompositionDrawListVisual : ServerCompositionContainerVisua
}
}
protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan commitedAt)
protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan committedAt)
{
if (reader.Read<byte>() == 1)
{
@ -56,7 +56,7 @@ internal class ServerCompositionDrawListVisual : ServerCompositionContainerVisua
_renderCommands = reader.ReadObject<CompositionDrawList?>();
_contentBounds = null;
}
base.DeserializeChangesCore(reader, commitedAt);
base.DeserializeChangesCore(reader, committedAt);
}
protected override void RenderCore(CompositorDrawingContextProxy canvas, Rect currentTransformedClip)

6
src/Avalonia.Base/Rendering/Composition/Server/ServerCustomCompositionVisual.cs

@ -16,9 +16,9 @@ internal class ServerCompositionCustomVisual : ServerCompositionContainerVisual,
_handler.Attach(this);
}
protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan commitedAt)
protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan committedAt)
{
base.DeserializeChangesCore(reader, commitedAt);
base.DeserializeChangesCore(reader, committedAt);
var count = reader.Read<int>();
for (var c = 0; c < count; c++)
{
@ -79,4 +79,4 @@ internal class ServerCompositionCustomVisual : ServerCompositionContainerVisual,
?.Log(_handler, $"Exception in {_handler.GetType().Name}.{nameof(CompositionCustomVisualHandler.OnRender)} {{0}}", e);
}
}
}
}

4
src/Avalonia.Base/Rendering/Composition/Server/ServerList.cs

@ -14,7 +14,7 @@ namespace Avalonia.Rendering.Composition.Server
{
public List<T> List { get; } = new List<T>();
protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan commitedAt)
protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan committedAt)
{
if (reader.Read<byte>() == 1)
{
@ -23,7 +23,7 @@ namespace Avalonia.Rendering.Composition.Server
for (var c = 0; c < count; c++)
List.Add(reader.ReadObject<T>());
}
base.DeserializeChangesCore(reader, commitedAt);
base.DeserializeChangesCore(reader, committedAt);
}
public override long LastChangedBy

8
src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs

@ -104,13 +104,13 @@ namespace Avalonia.Rendering.Composition.Server
}
protected void SetAnimatedValue<T>(CompositionProperty prop, ref T field,
TimeSpan commitedAt, IAnimationInstance animation) where T : struct
TimeSpan committedAt, IAnimationInstance animation) where T : struct
{
if (IsActive && _animations.TryGetValue(prop, out var oldAnimation))
oldAnimation.Deactivate();
_animations[prop] = animation;
animation.Initialize(commitedAt, ExpressionVariant.Create(field), prop);
animation.Initialize(committedAt, ExpressionVariant.Create(field), prop);
if(IsActive)
animation.Activate();
@ -165,7 +165,7 @@ namespace Avalonia.Rendering.Composition.Server
public virtual CompositionProperty? GetCompositionProperty(string fieldName) => null;
protected virtual void DeserializeChangesCore(BatchStreamReader reader, TimeSpan commitedAt)
protected virtual void DeserializeChangesCore(BatchStreamReader reader, TimeSpan committedAt)
{
if (this is IDisposable disp
&& reader.Read<byte>() == 1)
@ -174,7 +174,7 @@ namespace Avalonia.Rendering.Composition.Server
public void DeserializeChanges(BatchStreamReader reader, Batch batch)
{
DeserializeChangesCore(reader, batch.CommitedAt);
DeserializeChangesCore(reader, batch.CommittedAt);
ValuesInvalidated();
ItselfLastChangedBy = batch.SequenceId;
}

2
src/Avalonia.Base/Rendering/Composition/Transport/Batch.cs

@ -29,7 +29,7 @@ namespace Avalonia.Rendering.Composition.Transport
public BatchStreamData Changes { get; private set; }
public TimeSpan CommitedAt { get; set; }
public TimeSpan CommittedAt { get; set; }
public void Complete()
{

4
src/Avalonia.Controls/BorderVisual.cs

@ -63,9 +63,9 @@ class CompositionBorderVisual : CompositionDrawListVisual
}
protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan commitedAt)
protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan committedAt)
{
base.DeserializeChangesCore(reader, commitedAt);
base.DeserializeChangesCore(reader, committedAt);
if (reader.Read<bool>())
_cornerRadius = reader.Read<CornerRadius>();
}

2
src/tools/DevAnalyzers/GenericVirtualAnalyzer.cs

@ -16,7 +16,7 @@ public class GenericVirtualAnalyzer : DiagnosticAnalyzer
"Performance",
DiagnosticSeverity.Warning,
isEnabledByDefault: true,
description: "Generic virtual methods affect JIT startup time adversly and should be avoided.");
description: "Generic virtual methods affect JIT startup time adversely and should be avoided.");
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);

6
src/tools/DevGenerators/CompositionGenerator/Generator.cs

@ -257,7 +257,7 @@ namespace Avalonia.SourceGenerator.CompositionGenerator
if (cl.Properties.Count > 0)
{
server = server.AddMembers(((MethodDeclarationSyntax)ParseMemberDeclaration(
$"protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan commitedAt){{}}")
$"protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan committedAt){{}}")
!)
.WithBody(ApplyDeserializeChangesEpilogue(deserializeMethodBody, cl)));
server = server.AddMembers(MethodDeclaration(ParseTypeName("void"), "OnFieldsDeserialized")
@ -481,7 +481,7 @@ return;
private static BlockSyntax DeserializeChangesPrologue(GClass cl)
{
return Block(ParseStatement($@"
base.DeserializeChangesCore(reader, commitedAt);
base.DeserializeChangesCore(reader, committedAt);
DeserializeChangesExtra(reader);
var changed = reader.Read<{ChangedFieldsTypeName(cl)}>();
"));
@ -500,7 +500,7 @@ var changed = reader.Read<{ChangedFieldsTypeName(cl)}>();
{
code = $@"
if((changed & {changedFieldsType}.{prop.Name}Animated) == {changedFieldsType}.{prop.Name}Animated)
SetAnimatedValue({CompositionPropertyField(prop)}, ref {PropertyBackingFieldName(prop)}, commitedAt, reader.ReadObject<IAnimationInstance>());
SetAnimatedValue({CompositionPropertyField(prop)}, ref {PropertyBackingFieldName(prop)}, committedAt, reader.ReadObject<IAnimationInstance>());
else ";
}

Loading…
Cancel
Save