aseprite / laf

A C++ library to create desktop applications
https://aseprite.github.io/laf/
MIT License
274 stars 58 forks source link

New Paint::SrcEdges to enable mipmaps #97

Closed dacap closed 1 month ago

dacap commented 1 month ago

This can be used to fix:

https://github.com/aseprite/aseprite/issues/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.

aseprite-bot commented 1 month ago

clang-tidy review says "All clean, LGTM! :+1:"