Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@alexandrvslv
Copy link
Contributor

Description of Change

When you nead maps several points without heap allocation and with only one pInvoke

cost of pInvoke

p1 = matrix.MapPoint(p1);
p2 = matrix.MapPoint(p2);
p3 = matrix.MapPoint(p3);

cost of allocation

var points = new [] { p1,  p2,  p3 };
matrix.MapPoints(points, points);

decision

Span<SKPoint> points = stackalloc [] { p1,  p2,  p3 };
matrix.MapPoints(points, points);

Miss SKPath.AddPoly tests

API Changes

Added:

  • void SKMatrix.MapPoints(Span<SKPoint> result, ReadOnlySpan<SKPoint> points)
  • void SKMatrix.MapVectors(Span<SKPoint> result, ReadOnlySpan<SKPoint> points)
  • void SKPath.AddPoly (ReadOnlySpan<SKPoint> points, bool close = true)

Behavioral Changes

None.

Required skia PR

None.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Merged related skia PRs
  • Changes adhere to coding standard
  • Updated documentation

…<SKPoint>

When you nead maps several points without heap allocation and with only one pInvoke

*Add SKMatrix  tests
@dotnet-policy-service
Copy link
Contributor

Hey there @alexandrvslv! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@alexandrvslv
Copy link
Contributor Author

@dotnet-policy-service agree

@mattleibow
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mattleibow
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mattleibow mattleibow merged commit 44d6780 into mono:main Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.