Skip to content

Commit

Permalink
feat(pointers): [PERF] [WASM] Marshal pointer events instead of seria…
Browse files Browse the repository at this point in the history
…lizing them
  • Loading branch information
dr1rrb committed Jan 21, 2022
1 parent 6459564 commit 44df154
Show file tree
Hide file tree
Showing 16 changed files with 2,235 additions and 1,531 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private static string InvokeJSWithTrace(string str)
}
}

private static string InnerInvokeJS(String str)
private static string InnerInvokeJS(string str)
{
if (_logger.IsEnabled(LogLevel.Debug))
{
Expand Down
3 changes: 3 additions & 0 deletions src/Uno.UI/LinkerDefinition.Wasm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<type fullname="Uno.UI.Wasm.WasmHttpHandler" />

<type fullname="Windows.UI.Xaml.UIElement" />
<type fullname="Windows.UI.Xaml.UIElement">
<method name="OnNativePointerEvent" />
</type>
<type fullname="Windows.UI.Xaml.Window" />
<type fullname="Windows.UI.Xaml.Media.BrushConverter" />
<type fullname="Windows.UI.Xaml.Media.ImageSourceConverter" />
Expand Down
3 changes: 1 addition & 2 deletions src/Uno.UI/UI/Xaml/UIElement.EventRegistration.wasm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ public static int DispatchEvent(int handle, string eventName, string eventArgs)
internal enum HtmlEventExtractor : int
{
None = 0,
PointerEventExtractor = 1, // See PayloadToPointerArgs
TappedEventExtractor = 2,
KeyboardEventExtractor = 3,
FocusEventExtractor = 4,
Expand All @@ -336,7 +335,7 @@ internal enum HtmlEventExtractor : int
}

[Flags]
internal enum HtmlEventDispatchResult
internal enum HtmlEventDispatchResult : byte
{
/// <summary>
/// Event has been dispatched properly, but there is no specific action to take.
Expand Down
4 changes: 4 additions & 0 deletions src/Uno.UI/UI/Xaml/UIElement.Pointers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,12 @@ static UIElement()
#if UNO_HAS_ENHANCED_HIT_TEST_PROPERTY
HitTestVisibilityProperty.GetMetadata(uiElement).MergePropertyChangedCallback(ClearPointersStateIfNeeded);
#endif

InitializePointersStaticPartial();
}

static partial void InitializePointersStaticPartial();

#region ManipulationMode (DP)
public static DependencyProperty ManipulationModeProperty { get; } = DependencyProperty.Register(
"ManipulationMode",
Expand Down

0 comments on commit 44df154

Please sign in to comment.