Browse Source

Merge pull request #9865 from SimonCropp/fix-Committed-typo

fix Committed typo
pull/9921/head
Nikita Tsukanov 4 years ago
committed by GitHub
parent
commit
a8dda85c43
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Base/Rendering/Composition/Compositor.cs
  2. 4
      src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawListVisual.cs
  3. 4
      src/Avalonia.Base/Rendering/Composition/Server/ServerCustomCompositionVisual.cs
  4. 4
      src/Avalonia.Base/Rendering/Composition/Server/ServerList.cs
  5. 8
      src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs
  6. 2
      src/Avalonia.Base/Rendering/Composition/Transport/Batch.cs
  7. 4
      src/Avalonia.Controls/BorderVisual.cs
  8. 6
      src/tools/DevGenerators/CompositionGenerator/Generator.cs

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); _server.EnqueueBatch(batch);
lock (_pendingBatchLock) 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) if (reader.Read<byte>() == 1)
{ {
@ -56,7 +56,7 @@ internal class ServerCompositionDrawListVisual : ServerCompositionContainerVisua
_renderCommands = reader.ReadObject<CompositionDrawList?>(); _renderCommands = reader.ReadObject<CompositionDrawList?>();
_contentBounds = null; _contentBounds = null;
} }
base.DeserializeChangesCore(reader, commitedAt); base.DeserializeChangesCore(reader, committedAt);
} }
protected override void RenderCore(CompositorDrawingContextProxy canvas, Rect currentTransformedClip) protected override void RenderCore(CompositorDrawingContextProxy canvas, Rect currentTransformedClip)

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

@ -16,9 +16,9 @@ internal class ServerCompositionCustomVisual : ServerCompositionContainerVisual,
_handler.Attach(this); _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>(); var count = reader.Read<int>();
for (var c = 0; c < count; c++) for (var c = 0; c < count; c++)
{ {

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>(); 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) if (reader.Read<byte>() == 1)
{ {
@ -23,7 +23,7 @@ namespace Avalonia.Rendering.Composition.Server
for (var c = 0; c < count; c++) for (var c = 0; c < count; c++)
List.Add(reader.ReadObject<T>()); List.Add(reader.ReadObject<T>());
} }
base.DeserializeChangesCore(reader, commitedAt); base.DeserializeChangesCore(reader, committedAt);
} }
public override long LastChangedBy 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, 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)) if (IsActive && _animations.TryGetValue(prop, out var oldAnimation))
oldAnimation.Deactivate(); oldAnimation.Deactivate();
_animations[prop] = animation; _animations[prop] = animation;
animation.Initialize(commitedAt, ExpressionVariant.Create(field), prop); animation.Initialize(committedAt, ExpressionVariant.Create(field), prop);
if(IsActive) if(IsActive)
animation.Activate(); animation.Activate();
@ -165,7 +165,7 @@ namespace Avalonia.Rendering.Composition.Server
public virtual CompositionProperty? GetCompositionProperty(string fieldName) => null; 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 if (this is IDisposable disp
&& reader.Read<byte>() == 1) && reader.Read<byte>() == 1)
@ -174,7 +174,7 @@ namespace Avalonia.Rendering.Composition.Server
public void DeserializeChanges(BatchStreamReader reader, Batch batch) public void DeserializeChanges(BatchStreamReader reader, Batch batch)
{ {
DeserializeChangesCore(reader, batch.CommitedAt); DeserializeChangesCore(reader, batch.CommittedAt);
ValuesInvalidated(); ValuesInvalidated();
ItselfLastChangedBy = batch.SequenceId; 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 BatchStreamData Changes { get; private set; }
public TimeSpan CommitedAt { get; set; } public TimeSpan CommittedAt { get; set; }
public void Complete() 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>()) if (reader.Read<bool>())
_cornerRadius = reader.Read<CornerRadius>(); _cornerRadius = reader.Read<CornerRadius>();
} }

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

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

Loading…
Cancel
Save