committed by
GitHub
82 changed files with 1221 additions and 1047 deletions
@ -1,6 +1,8 @@ |
|||||
|
// Special license applies <see href="https://raw.githubusercontent.com/AvaloniaUI/Avalonia/master/src/Avalonia.Base/Rendering/Composition/License.md">License.md</see>
|
||||
|
|
||||
namespace Avalonia.Rendering.Composition; |
namespace Avalonia.Rendering.Composition; |
||||
|
|
||||
internal interface ICompositionTargetDebugEvents |
internal interface ICompositionTargetDebugEvents |
||||
{ |
{ |
||||
void RectInvalidated(Rect rc); |
void RectInvalidated(Rect rc); |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,7 @@ |
|||||
|
Please note: Any code in this directory is excluded from the normal MIT license. |
||||
|
|
||||
|
This code is owned and copyright to Avalonia OU. |
||||
|
|
||||
|
This code may be used free of charge by any application that consumes Avalonia binary packages as a direct or indirect dependency. |
||||
|
|
||||
|
Explicit permission is required for any other use outside of Avalonia applications. |
||||
@ -1,9 +1,11 @@ |
|||||
using System; |
using System; |
||||
|
|
||||
|
// Special license applies <see href="https://raw.githubusercontent.com/AvaloniaUI/Avalonia/master/src/Avalonia.Base/Rendering/Composition/License.md">License.md</see>
|
||||
|
|
||||
namespace Avalonia.Rendering.Composition.Transport; |
namespace Avalonia.Rendering.Composition.Transport; |
||||
|
|
||||
internal class BatchStreamDebugMarkers |
internal class BatchStreamDebugMarkers |
||||
{ |
{ |
||||
public static object ObjectEndMarker = new object(); |
public static object ObjectEndMarker = new object(); |
||||
public static Guid ObjectEndMagic = Guid.NewGuid(); |
public static Guid ObjectEndMagic = Guid.NewGuid(); |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,3 @@ |
|||||
|
Please note the composition renderer is not subject to the usual MIT license. |
||||
|
|
||||
|
Please contact us for more details and see [License.md](https://raw.githubusercontent.com/AvaloniaUI/Avalonia/master/src/Avalonia.Base/Rendering/Composition/License.md) |
||||
@ -1,188 +1,190 @@ |
|||||
<Styles xmlns="https://github.com/avaloniaui" |
<ResourceDictionary xmlns="https://github.com/avaloniaui" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
x:CompileBindings="True"> |
x:CompileBindings="True"> |
||||
|
|
||||
<Style Selector="Thumb.ColorSliderThumbStyle"> |
<ControlTheme x:Key="ColorSliderThumbTheme" |
||||
<Setter Property="BorderThickness" Value="0" /> |
TargetType="Thumb"> |
||||
|
<Setter Property="Background" Value="Transparent" /> |
||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" /> |
||||
|
<Setter Property="BorderThickness" Value="3" /> |
||||
|
<Setter Property="CornerRadius" Value="10" /> |
||||
<Setter Property="Template"> |
<Setter Property="Template"> |
||||
<Setter.Value> |
<Setter.Value> |
||||
<ControlTemplate> |
<ControlTemplate> |
||||
<Border Background="{TemplateBinding Background}" |
<Border Background="{TemplateBinding Background}" |
||||
BorderBrush="{TemplateBinding BorderBrush}" |
BorderBrush="{TemplateBinding BorderBrush}" |
||||
BorderThickness="{TemplateBinding BorderThickness}" |
BorderThickness="{TemplateBinding BorderThickness}" |
||||
CornerRadius="10" /> |
CornerRadius="{TemplateBinding CornerRadius}" /> |
||||
</ControlTemplate> |
</ControlTemplate> |
||||
</Setter.Value> |
</Setter.Value> |
||||
</Setter> |
</Setter> |
||||
</Style> |
</ControlTheme> |
||||
|
|
||||
<Style Selector="ColorSlider:horizontal"> |
<ControlTheme x:Key="{x:Type ColorSlider}" |
||||
<Setter Property="BorderThickness" Value="0" /> |
TargetType="ColorSlider"> |
||||
<Setter Property="CornerRadius" Value="10" /> |
|
||||
<Setter Property="Height" Value="20" /> |
|
||||
<Setter Property="Template"> |
|
||||
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}" |
|
||||
BorderBrush="{TemplateBinding BorderBrush}" |
|
||||
CornerRadius="{TemplateBinding CornerRadius}"> |
|
||||
<Grid Margin="{TemplateBinding Padding}"> |
|
||||
<Rectangle HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch" |
|
||||
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
|
||||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|
||||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|
||||
<Rectangle HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch" |
|
||||
Fill="{TemplateBinding Background}" |
|
||||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|
||||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|
||||
<Track Name="PART_Track" |
|
||||
HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch" |
|
||||
Minimum="{TemplateBinding Minimum}" |
|
||||
Maximum="{TemplateBinding Maximum}" |
|
||||
Value="{TemplateBinding Value, Mode=TwoWay}" |
|
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
|
||||
Orientation="Horizontal"> |
|
||||
<Track.DecreaseButton> |
|
||||
<RepeatButton Name="PART_DecreaseButton" |
|
||||
Background="Transparent" |
|
||||
Focusable="False" |
|
||||
HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch"> |
|
||||
<RepeatButton.Template> |
|
||||
<ControlTemplate> |
|
||||
<Border Name="FocusTarget" |
|
||||
Background="Transparent" |
|
||||
Margin="0,-10" /> |
|
||||
</ControlTemplate> |
|
||||
</RepeatButton.Template> |
|
||||
</RepeatButton> |
|
||||
</Track.DecreaseButton> |
|
||||
<Track.IncreaseButton> |
|
||||
<RepeatButton Name="PART_IncreaseButton" |
|
||||
Background="Transparent" |
|
||||
Focusable="False" |
|
||||
HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch"> |
|
||||
<RepeatButton.Template> |
|
||||
<ControlTemplate> |
|
||||
<Border Name="FocusTarget" |
|
||||
Background="Transparent" |
|
||||
Margin="0,-10" /> |
|
||||
</ControlTemplate> |
|
||||
</RepeatButton.Template> |
|
||||
</RepeatButton> |
|
||||
</Track.IncreaseButton> |
|
||||
<Thumb Classes="ColorSliderThumbStyle" |
|
||||
Name="ColorSliderThumb" |
|
||||
Margin="0" |
|
||||
Padding="0" |
|
||||
DataContext="{TemplateBinding Value}" |
|
||||
Height="{TemplateBinding Height}" |
|
||||
Width="{TemplateBinding Height}" /> |
|
||||
</Track> |
|
||||
</Grid> |
|
||||
</Border> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ColorSlider:vertical"> |
<Style Selector="^:horizontal"> |
||||
<Setter Property="BorderThickness" Value="0" /> |
<Setter Property="BorderThickness" Value="0" /> |
||||
<Setter Property="CornerRadius" Value="10" /> |
<Setter Property="CornerRadius" Value="10" /> |
||||
<Setter Property="Width" Value="20" /> |
<Setter Property="Height" Value="20" /> |
||||
<Setter Property="Template"> |
<Setter Property="Template"> |
||||
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
||||
<Border BorderThickness="{TemplateBinding BorderThickness}" |
<Border BorderThickness="{TemplateBinding BorderThickness}" |
||||
BorderBrush="{TemplateBinding BorderBrush}" |
BorderBrush="{TemplateBinding BorderBrush}" |
||||
CornerRadius="{TemplateBinding CornerRadius}"> |
CornerRadius="{TemplateBinding CornerRadius}"> |
||||
<Grid Margin="{TemplateBinding Padding}"> |
<Grid Margin="{TemplateBinding Padding}"> |
||||
<Rectangle HorizontalAlignment="Stretch" |
<Rectangle HorizontalAlignment="Stretch" |
||||
VerticalAlignment="Stretch" |
VerticalAlignment="Stretch" |
||||
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
||||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
||||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
||||
<Rectangle HorizontalAlignment="Stretch" |
<Rectangle HorizontalAlignment="Stretch" |
||||
VerticalAlignment="Stretch" |
VerticalAlignment="Stretch" |
||||
Fill="{TemplateBinding Background}" |
Fill="{TemplateBinding Background}" |
||||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
||||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
||||
<Track Name="PART_Track" |
<Track Name="PART_Track" |
||||
HorizontalAlignment="Stretch" |
HorizontalAlignment="Stretch" |
||||
VerticalAlignment="Stretch" |
VerticalAlignment="Stretch" |
||||
Minimum="{TemplateBinding Minimum}" |
Minimum="{TemplateBinding Minimum}" |
||||
Maximum="{TemplateBinding Maximum}" |
Maximum="{TemplateBinding Maximum}" |
||||
Value="{TemplateBinding Value, Mode=TwoWay}" |
Value="{TemplateBinding Value, Mode=TwoWay}" |
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
||||
Orientation="Vertical"> |
Orientation="Horizontal"> |
||||
<Track.DecreaseButton> |
<Track.DecreaseButton> |
||||
<RepeatButton Name="PART_DecreaseButton" |
<RepeatButton Name="PART_DecreaseButton" |
||||
Background="Transparent" |
Background="Transparent" |
||||
Focusable="False" |
Focusable="False" |
||||
HorizontalAlignment="Stretch" |
HorizontalAlignment="Stretch" |
||||
VerticalAlignment="Stretch"> |
VerticalAlignment="Stretch"> |
||||
<RepeatButton.Template> |
<RepeatButton.Template> |
||||
<ControlTemplate> |
<ControlTemplate> |
||||
<Border Name="FocusTarget" |
<Border Name="FocusTarget" |
||||
Background="Transparent" |
Background="Transparent" |
||||
Margin="0,-10" /> |
Margin="0,-10" /> |
||||
</ControlTemplate> |
</ControlTemplate> |
||||
</RepeatButton.Template> |
</RepeatButton.Template> |
||||
</RepeatButton> |
</RepeatButton> |
||||
</Track.DecreaseButton> |
</Track.DecreaseButton> |
||||
<Track.IncreaseButton> |
<Track.IncreaseButton> |
||||
<RepeatButton Name="PART_IncreaseButton" |
<RepeatButton Name="PART_IncreaseButton" |
||||
Background="Transparent" |
Background="Transparent" |
||||
Focusable="False" |
Focusable="False" |
||||
HorizontalAlignment="Stretch" |
HorizontalAlignment="Stretch" |
||||
VerticalAlignment="Stretch"> |
VerticalAlignment="Stretch"> |
||||
<RepeatButton.Template> |
<RepeatButton.Template> |
||||
<ControlTemplate> |
<ControlTemplate> |
||||
<Border Name="FocusTarget" |
<Border Name="FocusTarget" |
||||
Background="Transparent" |
Background="Transparent" |
||||
Margin="0,-10" /> |
Margin="0,-10" /> |
||||
</ControlTemplate> |
</ControlTemplate> |
||||
</RepeatButton.Template> |
</RepeatButton.Template> |
||||
</RepeatButton> |
</RepeatButton> |
||||
</Track.IncreaseButton> |
</Track.IncreaseButton> |
||||
<Thumb Classes="ColorSliderThumbStyle" |
<Thumb Name="ColorSliderThumb" |
||||
Name="ColorSliderThumb" |
Theme="{StaticResource ColorSliderThumbTheme}" |
||||
Margin="0" |
Margin="0" |
||||
Padding="0" |
Padding="0" |
||||
DataContext="{TemplateBinding Value}" |
DataContext="{TemplateBinding Value}" |
||||
Height="{TemplateBinding Width}" |
Height="{TemplateBinding Height}" |
||||
Width="{TemplateBinding Width}" /> |
Width="{TemplateBinding Height}" /> |
||||
</Track> |
</Track> |
||||
</Grid> |
</Grid> |
||||
</Border> |
</Border> |
||||
</ControlTemplate> |
</ControlTemplate> |
||||
</Setter> |
</Setter> |
||||
</Style> |
</Style> |
||||
|
|
||||
<!-- Normal State --> |
<Style Selector="^:vertical"> |
||||
<Style Selector="ColorSlider /template/ Thumb.ColorSliderThumbStyle"> |
<Setter Property="BorderThickness" Value="0" /> |
||||
<Setter Property="Background" Value="Transparent" /> |
<Setter Property="CornerRadius" Value="10" /> |
||||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" /> |
<Setter Property="Width" Value="20" /> |
||||
<Setter Property="BorderThickness" Value="3" /> |
<Setter Property="Template"> |
||||
</Style> |
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" |
||||
|
BorderBrush="{TemplateBinding BorderBrush}" |
||||
|
CornerRadius="{TemplateBinding CornerRadius}"> |
||||
|
<Grid Margin="{TemplateBinding Padding}"> |
||||
|
<Rectangle HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch" |
||||
|
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
||||
|
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
||||
|
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
||||
|
<Rectangle HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch" |
||||
|
Fill="{TemplateBinding Background}" |
||||
|
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
||||
|
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
||||
|
<Track Name="PART_Track" |
||||
|
HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch" |
||||
|
Minimum="{TemplateBinding Minimum}" |
||||
|
Maximum="{TemplateBinding Maximum}" |
||||
|
Value="{TemplateBinding Value, Mode=TwoWay}" |
||||
|
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
||||
|
Orientation="Vertical"> |
||||
|
<Track.DecreaseButton> |
||||
|
<RepeatButton Name="PART_DecreaseButton" |
||||
|
Background="Transparent" |
||||
|
Focusable="False" |
||||
|
HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch"> |
||||
|
<RepeatButton.Template> |
||||
|
<ControlTemplate> |
||||
|
<Border Name="FocusTarget" |
||||
|
Background="Transparent" |
||||
|
Margin="0,-10" /> |
||||
|
</ControlTemplate> |
||||
|
</RepeatButton.Template> |
||||
|
</RepeatButton> |
||||
|
</Track.DecreaseButton> |
||||
|
<Track.IncreaseButton> |
||||
|
<RepeatButton Name="PART_IncreaseButton" |
||||
|
Background="Transparent" |
||||
|
Focusable="False" |
||||
|
HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch"> |
||||
|
<RepeatButton.Template> |
||||
|
<ControlTemplate> |
||||
|
<Border Name="FocusTarget" |
||||
|
Background="Transparent" |
||||
|
Margin="0,-10" /> |
||||
|
</ControlTemplate> |
||||
|
</RepeatButton.Template> |
||||
|
</RepeatButton> |
||||
|
</Track.IncreaseButton> |
||||
|
<Thumb Name="ColorSliderThumb" |
||||
|
Theme="{StaticResource ColorSliderThumbTheme}" |
||||
|
Margin="0" |
||||
|
Padding="0" |
||||
|
DataContext="{TemplateBinding Value}" |
||||
|
Height="{TemplateBinding Width}" |
||||
|
Width="{TemplateBinding Width}" /> |
||||
|
</Track> |
||||
|
</Grid> |
||||
|
</Border> |
||||
|
</ControlTemplate> |
||||
|
</Setter> |
||||
|
</Style> |
||||
|
|
||||
|
<!-- Selector/Thumb Color --> |
||||
|
<Style Selector="^:pointerover /template/ Thumb#ColorSliderThumb"> |
||||
|
<Setter Property="Opacity" Value="0.75" /> |
||||
|
</Style> |
||||
|
<Style Selector="^:pointerover:dark-selector /template/ Thumb#ColorSliderThumb"> |
||||
|
<Setter Property="Opacity" Value="0.7" /> |
||||
|
</Style> |
||||
|
<Style Selector="^:pointerover:light-selector /template/ Thumb#ColorSliderThumb"> |
||||
|
<Setter Property="Opacity" Value="0.8" /> |
||||
|
</Style> |
||||
|
|
||||
<!-- Selector/Thumb Color --> |
<Style Selector="^:dark-selector /template/ Thumb#ColorSliderThumb"> |
||||
<Style Selector="ColorSlider:pointerover /template/ Thumb.ColorSliderThumbStyle"> |
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlBackgroundChromeBlackHighBrush}" /> |
||||
<Setter Property="Opacity" Value="0.75" /> |
</Style> |
||||
</Style> |
<Style Selector="^:light-selector /template/ Thumb#ColorSliderThumb"> |
||||
<Style Selector="ColorSlider:pointerover:dark-selector /template/ Thumb.ColorSliderThumbStyle"> |
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlBackgroundChromeWhiteBrush}" /> |
||||
<Setter Property="Opacity" Value="0.7" /> |
</Style> |
||||
</Style> |
|
||||
<Style Selector="ColorSlider:pointerover:light-selector /template/ Thumb.ColorSliderThumbStyle"> |
|
||||
<Setter Property="Opacity" Value="0.8" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ColorSlider:dark-selector /template/ Thumb.ColorSliderThumbStyle"> |
</ControlTheme> |
||||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlBackgroundChromeBlackHighBrush}" /> |
|
||||
</Style> |
|
||||
<Style Selector="ColorSlider:light-selector /template/ Thumb.ColorSliderThumbStyle"> |
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlBackgroundChromeWhiteBrush}" /> |
|
||||
</Style> |
|
||||
|
|
||||
</Styles> |
</ResourceDictionary> |
||||
|
|||||
File diff suppressed because it is too large
@ -0,0 +1,27 @@ |
|||||
|
using Avalonia.LinuxFramebuffer.Output; |
||||
|
using Avalonia.Media; |
||||
|
using JetBrains.Annotations; |
||||
|
|
||||
|
namespace Avalonia.LinuxFramebuffer |
||||
|
{ |
||||
|
public class DrmOutputOptions |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Scaling factor.
|
||||
|
/// Default: 1.0
|
||||
|
/// </summary>
|
||||
|
public double Scaling { get; set; } = 1.0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// If true an two cycle buffer swapping is processed at init.
|
||||
|
/// Default: True
|
||||
|
/// </summary>
|
||||
|
public bool EnableInitialBufferSwapping { get; set; } = true; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Color for <see cref="EnableInitialBufferSwapping"/>
|
||||
|
/// Default: R0 G0 B0 A0
|
||||
|
/// </summary>
|
||||
|
public Color InitialBufferSwappingColor { get; set; } = new Color(0, 0, 0, 0); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue