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

New Paint::SrcEdges to enable mipmaps #97

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Conversation

dacap
Copy link
Member

@dacap dacap commented Jun 19, 2024

This can be used to fix:

aseprite/aseprite#4317

From SkCanvas::SrcRectConstraint docs:

"SrcRectConstraint controls the behavior at the edge of source
SkRect, provided to drawImageRect() when there is any filtering. If
kStrict is set, then extra code is used to ensure it nevers samples
outside of the src-rect. kStrict_SrcRectConstraint disables the
use of mipmaps."

We were always using kStrict, which disabled mipmaps.

This can be used to fix:

  aseprite/aseprite#4317

From SkCanvas::SrcRectConstraint docs:

  "SrcRectConstraint controls the behavior at the edge of source
   SkRect, provided to drawImageRect() when there is any filtering. If
   kStrict is set, then extra code is used to ensure it nevers samples
   outside of the src-rect. kStrict_SrcRectConstraint disables the
   use of mipmaps."

We were always using kStrict, which disabled mipmaps.
@dacap dacap self-assigned this Jun 19, 2024
@aseprite-bot
Copy link
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@dacap dacap merged commit 5f9189c into aseprite:main Jun 19, 2024
8 checks passed
@dacap dacap deleted the mipmaps branch June 19, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants