Skip to content

Commit

Permalink
Merge pull request #1045 from b-editor/rename-terrible-name
Browse files Browse the repository at this point in the history
Rename classes with unclear names
  • Loading branch information
yuto-trd authored Aug 16, 2024
2 parents 404b3c7 + dccb2db commit ef3a324
Show file tree
Hide file tree
Showing 147 changed files with 397 additions and 452 deletions.
19 changes: 19 additions & 0 deletions src/Beutl.Engine/Animation/InstanceClock.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Beutl.Animation;

public sealed class InstanceClock : IClock
{
public InstanceClock()
{
GlobalClock = this;
}

public TimeSpan CurrentTime { get; set; }

public TimeSpan AudioStartTime { get; set; }

public TimeSpan BeginTime { get; set; }

public TimeSpan DurationTime { get; set; }

public IClock GlobalClock { get; set; }
}
16 changes: 16 additions & 0 deletions src/Beutl.Engine/Animation/ZeroClock.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace Beutl.Animation;

internal sealed class ZeroClock : IClock
{
public static readonly ZeroClock Instance = new();

public TimeSpan CurrentTime => TimeSpan.Zero;

public TimeSpan AudioStartTime => TimeSpan.Zero;

public TimeSpan BeginTime => TimeSpan.Zero;

public TimeSpan DurationTime => TimeSpan.Zero;

public IClock GlobalClock => this;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
using Beutl.Media.Music;
using Beutl.Media.Music.Samples;

namespace Beutl.Rendering;
namespace Beutl.Audio.Composing;

public class Composer : IComposer
{
private readonly Audio.Audio _audio;
private readonly Beutl.Audio.Audio _audio;
private readonly InstanceClock _instanceClock = new();

public Composer()
{
SampleRate = 44100;
_audio = new Audio.Audio(SampleRate);
_audio = new Beutl.Audio.Audio(SampleRate);
}

~Composer()
Expand Down Expand Up @@ -46,7 +46,7 @@ public void Dispose()
}
}

protected virtual void ComposeCore(Audio.Audio audio)
protected virtual void ComposeCore(Beutl.Audio.Audio audio)
{
//RenderScene.Render(_audio);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Beutl.Media.Music;
using Beutl.Media.Music.Samples;

namespace Beutl.Rendering;
namespace Beutl.Audio.Composing;

public interface IComposer : IDisposable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Beutl.Engine/Audio/Sound.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Beutl.Animation;
using Beutl.Audio.Effects;
using Beutl.Graphics.Rendering;
using Beutl.Media;
using Beutl.Media.Music;
using Beutl.Media.Music.Samples;
using Beutl.Rendering;

namespace Beutl.Audio;

Expand Down
2 changes: 0 additions & 2 deletions src/Beutl.Engine/Graphics/BrushConstructor.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Beutl.Graphics.Rendering;
using Beutl.Media;
using Beutl.Media.Source;
using Beutl.Rendering;

using SkiaSharp;

namespace Beutl.Graphics;
Expand Down
2 changes: 1 addition & 1 deletion src/Beutl.Engine/Graphics/Drawable.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.ComponentModel.DataAnnotations;
using Beutl.Animation;
using Beutl.Graphics.Effects;
using Beutl.Graphics.Rendering;
using Beutl.Graphics.Transformation;
using Beutl.Language;
using Beutl.Media;
using Beutl.Rendering;
using Beutl.Serialization;

namespace Beutl.Graphics;
Expand Down
4 changes: 1 addition & 3 deletions src/Beutl.Engine/Graphics/FilterEffects/ChromaKey.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System.ComponentModel.DataAnnotations;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

using Beutl.Graphics.Rendering;
using Beutl.Language;
using Beutl.Media;
using Beutl.Media.Pixel;
using Beutl.Rendering;

using ILGPU;
using ILGPU.Runtime;

Expand Down
4 changes: 1 addition & 3 deletions src/Beutl.Engine/Graphics/FilterEffects/ColorKey.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System.ComponentModel.DataAnnotations;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

using Beutl.Graphics.Rendering;
using Beutl.Language;
using Beutl.Media;
using Beutl.Media.Pixel;
using Beutl.Rendering;

using ILGPU;
using ILGPU.Algorithms;
using ILGPU.Runtime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Beutl.Collections;
using Beutl.Graphics.Rendering;
using Beutl.Rendering.Cache;
using Beutl.Graphics.Rendering.Cache;

namespace Beutl.Graphics.Effects;

Expand Down
4 changes: 1 addition & 3 deletions src/Beutl.Engine/Graphics/FilterEffects/LutEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

using Beutl.Graphics.Rendering;
using Beutl.Language;
using Beutl.Media;
using Beutl.Rendering;

using ILGPU;
using ILGPU.Runtime;

Expand Down
3 changes: 1 addition & 2 deletions src/Beutl.Engine/Graphics/IImmediateCanvasFactory.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Beutl.Rendering.Cache;

using Beutl.Graphics.Rendering.Cache;
using SkiaSharp;

namespace Beutl.Graphics;
Expand Down
2 changes: 1 addition & 1 deletion src/Beutl.Engine/Graphics/ImmediateCanvas.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Beutl.Graphics.Effects;
using Beutl.Graphics.Rendering;
using Beutl.Graphics.Rendering.Cache;
using Beutl.Media;
using Beutl.Media.Pixel;
using Beutl.Media.Source;
using Beutl.Media.TextFormatting;
using Beutl.Rendering.Cache;
using Beutl.Threading;
using SkiaSharp;
using SkiaSharp.HarfBuzz;
Expand Down
5 changes: 2 additions & 3 deletions src/Beutl.Engine/Graphics/Rendering/BlendModeNode.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Beutl.Media.Source;
using Beutl.Rendering.Cache;

using Beutl.Graphics.Rendering.Cache;
using Beutl.Media.Source;
using SkiaSharp;

namespace Beutl.Graphics.Rendering;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Beutl.Graphics;

namespace Beutl.Rendering.Cache;
namespace Beutl.Graphics.Rendering.Cache;

public interface ISupportRenderCache
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

using Beutl.Graphics;
using Beutl.Graphics.Rendering;
using Beutl.Media.Source;
using Beutl.Threading;

using SkiaSharp;

namespace Beutl.Rendering.Cache;
namespace Beutl.Graphics.Rendering.Cache;

public sealed class RenderCache(IGraphicNode node) : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text.Json.Serialization;

using Beutl.Configuration;
using Beutl.Graphics;
using Beutl.Graphics.Rendering;
using Beutl.Media;
using Beutl.Media.Source;

using Microsoft.Extensions.Logging;

using SkiaSharp;

namespace Beutl.Rendering.Cache;
namespace Beutl.Graphics.Rendering.Cache;

public sealed class RenderCacheContext : IDisposable
{
Expand Down
1 change: 0 additions & 1 deletion src/Beutl.Engine/Graphics/Rendering/DeferradCanvas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Beutl.Media.Pixel;
using Beutl.Media.Source;
using Beutl.Media.TextFormatting;
using Beutl.Rendering;

namespace Beutl.Graphics.Rendering;

Expand Down
2 changes: 1 addition & 1 deletion src/Beutl.Engine/Graphics/Rendering/DrawBackdropNode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Beutl.Rendering.Cache;
using Beutl.Graphics.Rendering.Cache;

namespace Beutl.Graphics.Rendering;

Expand Down
3 changes: 1 addition & 2 deletions src/Beutl.Engine/Graphics/Rendering/FilterEffectNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
using System.Diagnostics;

using Beutl.Graphics.Effects;
using Beutl.Graphics.Rendering.Cache;
using Beutl.Media;
using Beutl.Media.Source;
using Beutl.Rendering.Cache;

using SkiaSharp;

namespace Beutl.Graphics.Rendering;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using Beutl.Graphics;
using Beutl.Graphics.Shapes;
using Beutl.Graphics.Shapes;
using Beutl.Media;
using Beutl.Media.Immutable;

namespace Beutl.Rendering;
namespace Beutl.Graphics.Rendering;

internal sealed class FpsText
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal enum CGLError
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal enum CGLOpenGLProfile
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal enum CGLPixelFormatAttribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#pragma warning disable SYSLIB1054
#pragma warning disable IDE1006

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal class Cgl
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using SkiaSharp;

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal class CglContext : GlContext
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using SkiaSharp;

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal abstract class GlContext : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#pragma warning disable SYSLIB1054
#pragma warning disable IDE1006

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal class Glx
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using SkiaSharp;

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal sealed class GlxContext : GlContext
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal enum XVisualClass : int
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

[StructLayout(LayoutKind.Sequential)]
internal struct XVisualInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#pragma warning disable SYSLIB1054
#pragma warning disable IDE1006

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal class Xlib
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

#pragma warning disable SYSLIB1054
#pragma warning disable IDE1006
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#pragma warning disable SYSLIB1054
#pragma warning disable IDE1006

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

internal static class Kernel32
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

[StructLayout(LayoutKind.Sequential)]
internal struct PIXELFORMATDESCRIPTOR
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

[StructLayout(LayoutKind.Sequential)]
internal struct RECT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Runtime.InteropServices;
using System.Text;

namespace Beutl.Rendering.GlContexts;
namespace Beutl.Graphics.Rendering.GlContexts;

#pragma warning disable SYSLIB1054
#pragma warning disable IDE1006
Expand Down
Loading

0 comments on commit ef3a324

Please sign in to comment.