Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win2D pipeline brushes #3112

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
8d5c6ef
Added extensions and Win2D helpers
Sergio0694 Jan 25, 2020
8d2a3cb
Added PipelineBuilder type
Sergio0694 Jan 25, 2020
c56259b
Added acrylic and tiles brushes
Sergio0694 Jan 25, 2020
5cf2d76
Added XamlCompositionBrush type
Sergio0694 Jan 25, 2020
cc3206b
Added Win2D/Composition effects
Sergio0694 Jan 25, 2020
137352e
Added pipeline brush
Sergio0694 Jan 25, 2020
59fc3e1
Minor code styling tweaks
Sergio0694 Jan 25, 2020
6433681
Switched composition cache to ConditionalWeakTable<TKey, TValue>
Sergio0694 Jan 25, 2020
3038e0c
Minor performance improvements
Sergio0694 Jan 25, 2020
4fc8a3e
More code switched to ConditionalWeakTable<TKey, TValue>
Sergio0694 Jan 25, 2020
f3a4a3d
Fixed missing file header
Sergio0694 Jan 25, 2020
bb06aef
Added empty PipelineBrush sample page
Sergio0694 Jan 29, 2020
873f0c3
Fixed an incorrect namespace
Sergio0694 Jan 29, 2020
960440e
Implemented PipelineBrush sample
Sergio0694 Jan 29, 2020
5b3caef
Fixed incorrect extensions namespaces
Sergio0694 Jan 29, 2020
cf13f31
Reordered using directives
Sergio0694 Jan 29, 2020
f1f6993
Code refactoring, added LuminanceToAlpha pipeline effect
Sergio0694 Jan 29, 2020
14da07b
Added C# sample code
Sergio0694 Jan 29, 2020
84e6fbd
Reordered a using statement
Sergio0694 Jan 29, 2020
371e3e2
Renamed some public APIs
Sergio0694 Jan 29, 2020
b844a1e
More API refactoring
Sergio0694 Jan 29, 2020
89f8886
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 Jan 29, 2020
d6ffabb
Removed unused API
Sergio0694 Jan 29, 2020
b913c99
Reordered a using statement
Sergio0694 Jan 30, 2020
66d4dce
Added support for repeated effects in a pipeline
Sergio0694 Jan 30, 2020
05363d4
Animation delegates changed to TimeSpan params
Sergio0694 Jan 30, 2020
90fda1f
Added effects setter APIs
Sergio0694 Jan 30, 2020
3a2f44c
Removed unnecessary remarks
Sergio0694 Jan 30, 2020
fd050ae
Added generic parameter to effect setters
Sergio0694 Jan 30, 2020
85b67e6
Added generic parameter to effect animations
Sergio0694 Jan 30, 2020
dc7718f
Added overloads to set/animate a color effect
Sergio0694 Jan 30, 2020
d331c1b
Fixed some XML docs
Sergio0694 Jan 30, 2020
9955738
Added check for composition capabilities in brushes
Sergio0694 Jan 30, 2020
371ea4d
BackdropSaturationBrush switched to pipeline
Sergio0694 Jan 30, 2020
f24c484
Removed unnecessary using directives
Sergio0694 Jan 30, 2020
3f534e6
Added pipeline invert effect
Sergio0694 Jan 30, 2020
cac2fd1
BackdropInvertBrush switched to pipeline
Sergio0694 Jan 30, 2020
ac6eede
Reordered using directives
Sergio0694 Jan 30, 2020
1856e72
BackdropBlurBrush switched to pipeline
Sergio0694 Jan 30, 2020
e63534c
Added sepia effect APIs
Sergio0694 Jan 30, 2020
f10c10a
BackdropSepiaBrush switched to pipeline
Sergio0694 Jan 30, 2020
e9fac05
Added HDR color pipeline initialization APIs
Sergio0694 Jan 30, 2020
184cd2b
Minor code refactoring
Sergio0694 Jan 30, 2020
a44b3ad
More code refactoring
Sergio0694 Jan 30, 2020
f4d37fc
More code refactoring
Sergio0694 Jan 30, 2020
066b948
Added exposure effect
Sergio0694 Jan 30, 2020
066666a
Added grayscale effect
Sergio0694 Jan 30, 2020
1d6a8f4
Minor code refactoring and bug fixes
Sergio0694 Jan 30, 2020
8147dbb
Switched to ValueTask<T> to reduce allocations, new APIs
Sergio0694 Jan 30, 2020
83103b7
Removed unnecessary APIs
Sergio0694 Jan 30, 2020
b17e27f
Streamlined prebuilt acrylic pipelines
Sergio0694 Jan 30, 2020
fcc39d7
Added support for live updates in the acrylic brush
Sergio0694 Jan 30, 2020
a1baa2f
Code refactoring to keep the style consistent
Sergio0694 Jan 30, 2020
9173a63
Added support for noiseless acrylic effects
Sergio0694 Jan 30, 2020
c053590
Code refactoring
Sergio0694 Jan 30, 2020
2283071
Added XML remarks with Win2D reference links
Sergio0694 Jan 30, 2020
667b932
Renamed the TintEffect type
Sergio0694 Jan 30, 2020
abb0b5b
Added TintEffect
Sergio0694 Jan 30, 2020
295f4ee
Added TemperatureAndTintEffect
Sergio0694 Jan 30, 2020
92a60db
Added HueRotationEffect
Sergio0694 Jan 31, 2020
02158fb
Aadded missing capability check
Sergio0694 Jan 31, 2020
e86b0f7
Removed unnecessary APIs, code refactoring
Sergio0694 Jan 31, 2020
33c1153
Removed an unnecessary resize step
Sergio0694 Jan 31, 2020
762cb16
Win2DImageHelper class renamed to SurfaceLoader
Sergio0694 Jan 31, 2020
e7d8b36
Unified SurfaceLoader APIs in the .Media package
Sergio0694 Jan 31, 2020
36f4bbe
Added sample page for the AcrylicBrush
Sergio0694 Jan 31, 2020
5a8d4f4
Updated AcrylicBrush icon
Sergio0694 Jan 31, 2020
6254e6f
Added bindings for the AcrylicBrush sample
Sergio0694 Jan 31, 2020
d2d13c6
Added dependency property to the TilesBrush
Sergio0694 Jan 31, 2020
452ba69
Added sample page for the TilesBrush
Sergio0694 Jan 31, 2020
c8fcd9d
Fixed two XML comments
Sergio0694 Jan 31, 2020
5af6d0b
Updated tile texture
Sergio0694 Jan 31, 2020
e499c25
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 Feb 1, 2020
e322de8
Added new brushes to the readme
Sergio0694 Feb 1, 2020
c9c71cb
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 Mar 15, 2020
2880686
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 Mar 18, 2020
6310bfc
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 Mar 25, 2020
4e64a24
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 Apr 1, 2020
655fd47
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 Apr 19, 2020
96e10ee
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 Apr 22, 2020
c1b5e39
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 May 5, 2020
3411bd6
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 May 6, 2020
60525b9
Merge branch 'master' into feature/win2d-pipeline-brushes
michael-hawker May 12, 2020
3299698
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 May 12, 2020
8550651
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 May 13, 2020
019a1ed
Minor code refactoring
Sergio0694 May 14, 2020
f887872
Added support for device lost in SurfaceLoader.Instance
Sergio0694 May 14, 2020
57176f1
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 May 15, 2020
cb3314e
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 May 15, 2020
948c8d1
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 May 15, 2020
d6d0e03
Updated tile brush texture
Sergio0694 May 15, 2020
0a95001
Added opacity to tile brush sample
Sergio0694 May 15, 2020
3a6b2a1
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 May 15, 2020
900bd87
Updated the PipelineBrush sample page icon
Sergio0694 May 15, 2020
b0623d0
Fixed PipelineBrush sample page shallow copy
Sergio0694 May 15, 2020
d4e74d8
Update Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TilesBrush/TilesBr…
Sergio0694 May 15, 2020
a7b3b13
Removed unnecessary CU badges
Sergio0694 May 15, 2020
3902294
Update Microsoft.Toolkit.Uwp.UI.Media/Brushes/AcrylicBrush.cs
Sergio0694 May 15, 2020
dd7af19
Added missing effects to shallow copy
Sergio0694 May 15, 2020
1687b11
Merge branch 'feature/win2d-pipeline-brushes' of https://github.com/S…
Sergio0694 May 15, 2020
59c101e
Moved brushes to .Media namespace
Sergio0694 May 15, 2020
ab21baf
Fixed crash in pipeline sample page
Sergio0694 May 16, 2020
5a8f83b
Switched BlendEffect.Mode to use proxy enum
Sergio0694 May 16, 2020
65a2b14
Minor code refactoring
Sergio0694 May 16, 2020
245e5ac
Added unicorn to PipelineBrush sample
Sergio0694 May 16, 2020
8eb07e9
Fixed code URLs for brushes
Sergio0694 May 16, 2020
8e7bd05
Fixed documentation URLs to brushes
Sergio0694 May 16, 2020
b6d81d9
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 May 16, 2020
198f2b8
Merge branch 'master' into feature/win2d-pipeline-brushes
michael-hawker May 16, 2020
cd4af98
Fix StyleCop Issues with namespaces in Brushes
michael-hawker May 16, 2020
fdfa755
Fixed uppercase acronym in public property
Sergio0694 May 16, 2020
ade1e04
Added DpiMode property to TilesBrush
Sergio0694 May 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,52 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:media="using:Microsoft.Toolkit.Uwp.UI.Media"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:brushes="using:Microsoft.Toolkit.Uwp.UI.Media.Brushes"
xmlns:effects="using:Microsoft.Toolkit.Uwp.UI.Media.Effects"
mc:Ignorable="d">

<!-- Shallow Copy -->
<!--Shallow copy-->
<Grid>
<Rectangle>
<Rectangle.Fill>
<media:BackdropSaturationBrush />
</Rectangle.Fill>
</Rectangle>
<Image Source="ms-appx:///Assets/Photos/BigFourSummerHeat.jpg"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ProgressRing IsActive="True" Grid.ColumnSpan="2"
VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" Width="200" Height="200"/>
<Border BorderBrush="Black" BorderThickness="1"
Grid.Column="2"
Height="400">
<Border.Background>
<brushes:PipelineBrush>
<brushes:PipelineBrush.Effects>
<effects:AcrylicEffect/>
<effects:BackdropEffect Source="Backdrop"/>
<effects:BlendEffect Mode="Multiply"/>
<effects:BlurEffect/>
<effects:ExposureEffect/>
<effects:GrayscaleEffect/>
<effects:HueRotationEffect/>
<effects:ImageEffect/>
<effects:InvertEffect/>
<effects:LuminanceToAlphaEffect/>
<effects:OpacityEffect Value="0.4"/>
<effects:SaturationEffect/>
<effects:SepiaEffect/>
<effects:ShadeEffect Color="#FF222222" Intensity="0.2"/>
<effects:SolidColorEffect/>
<effects:TemperatureAndTintEffect/>
<effects:BlendEffect Mode="Overlay" Placement="Background">
<effects:BlendEffect.Input>
<effects:TileEffect Uri="ms-appx:///Assets/BrushAssets/NoiseTexture.png"/>
</effects:BlendEffect.Input>
</effects:BlendEffect>
<effects:TintEffect/>
</brushes:PipelineBrush.Effects>
</brushes:PipelineBrush>
</Border.Background>
</Border>
</Grid>
</Grid>
</Page>
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@
mc:Ignorable="d">

<Grid>
<Image Source="ms-appx:///Assets/Photos/BigFourSummerHeat.jpg"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ProgressRing IsActive="True" Grid.ColumnSpan="2"
VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" Width="200" Height="200"/>
<Border BorderBrush="Black" BorderThickness="1"
Grid.Column="2"
Opacity="0.9"
Height="400">
<Border.Background>
<brushes:TilesBrush TextureUri="ms-appx:///Assets/BrushAssets/TileTexture.png"/>
</Border.Background>
</Border>
</Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>

<Image Source="ms-appx:///Assets/BrushAssets/TileTexture.png"
Grid.RowSpan="3"/>

<ProgressRing IsActive="True" Grid.RowSpan="2"
VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" Width="200" Height="200"/>

<Border BorderBrush="Black" BorderThickness="1"
Grid.Row="1"
Opacity="0.85"
Height="400">
<Border.Background>
<brushes:TilesBrush TextureUri="ms-appx:///Assets/BrushAssets/TileTexture.png"/>
</Border.Background>
</Border>
</Grid>
</Page>
10 changes: 0 additions & 10 deletions Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,6 @@
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropBlurBrush.cs",
"XamlCodeFile": "BackdropBlurBrushXaml.bind",
"Icon": "/SamplePages/BackdropBlurBrush/BackdropBlurBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropBlurBrush.md"
},
Expand All @@ -1051,7 +1050,6 @@
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropInvertBrush.cs",
"XamlCodeFile": "BackdropInvertBrushXaml.bind",
"Icon": "/SamplePages/BackdropInvertBrush/BackdropInvertBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropInvertBrush.md"
},
Expand All @@ -1062,7 +1060,6 @@
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropGammaTransferBrush.cs",
"XamlCodeFile": "BackdropGammaTransferBrushXaml.bind",
"Icon": "/SamplePages/BackdropGammaTransferBrush/BackdropGammaTransferBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropGammaTransferBrush.md"
},
Expand All @@ -1073,7 +1070,6 @@
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropSaturationBrush.cs",
"XamlCodeFile": "BackdropSaturationBrushXaml.bind",
"Icon": "/SamplePages/BackdropSaturationBrush/BackdropSaturationBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropSaturationBrush.md"
},
Expand All @@ -1084,7 +1080,6 @@
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropSepiaBrush.cs",
"XamlCodeFile": "BackdropSepiaBrushXaml.bind",
"Icon": "/SamplePages/BackdropSepiaBrush/BackdropSepiaBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropSepiaBrush.md"
},
Expand All @@ -1095,7 +1090,6 @@
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/ImageBlendBrush.cs",
"XamlCodeFile": "ImageBlendBrushXaml.bind",
"Icon": "/SamplePages/ImageBlendBrush/ImageBlendBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/ImageBlendBrush.md"
},
Expand All @@ -1106,7 +1100,6 @@
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/RadialGradientBrush.cs",
"XamlCodeFile": "RadialGradientBrushXaml.bind",
"Icon": "/SamplePages/RadialGradientBrush/RadialGradientBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/RadialGradientBrush.md"
},
Expand All @@ -1118,7 +1111,6 @@
"CodeFile": "PipelineBrushCode.bind",
"XamlCodeFile": "PipelineBrushXaml.bind",
"Icon": "/SamplePages/PipelineBrush/PipelineBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropSepiaBrush.md"
michael-hawker marked this conversation as resolved.
Show resolved Hide resolved
},
Expand All @@ -1129,7 +1121,6 @@
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropSepiaBrush.cs",
"XamlCodeFile": "AcrylicBrushXaml.bind",
"Icon": "/SamplePages/AcrylicBrush/AcrylicBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropSepiaBrush.md"
},
Expand All @@ -1140,7 +1131,6 @@
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropSepiaBrush.cs",
"XamlCodeFile": "TilesBrushXaml.bind",
"Icon": "/SamplePages/TilesBrush/TilesBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropSepiaBrush.md"
}
Expand Down