diff --git a/laf b/laf index 8059af40b..5f9189c33 160000 --- a/laf +++ b/laf @@ -1 +1 @@ -Subproject commit 8059af40be3b96a470fdd2f5a3631ad219d522aa +Subproject commit 5f9189c337bfc34bd5da4797734f53598cff3dc4 diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp index c7882bbd1..508509b7a 100644 --- a/src/app/ui/editor/editor.cpp +++ b/src/app/ui/editor/editor.cpp @@ -754,8 +754,11 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g, const gfx::Rect& sprite } if (rendered && rendered->nativeHandle()) { + os::Paint p; if (newEngine) { os::Sampling sampling; + p.srcEdges(os::Paint::SrcEdges::Fast); // Enable mipmaps if possible + if (m_proj.scaleX() < 1.0) { switch (pref.editor.downsampling()) { case gen::Downsampling::NEAREST: @@ -775,7 +778,6 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g, const gfx::Rect& sprite } } - os::Paint p; if (renderProperties.requiresRgbaBackbuffer) p.blendMode(os::BlendMode::SrcOver); else @@ -788,7 +790,11 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g, const gfx::Rect& sprite &p); } else { - g->blit(rendered.get(), 0, 0, dest.x, dest.y, dest.w, dest.h); + g->drawSurface(rendered.get(), + gfx::Rect(0, 0, dest.w, dest.h), + gfx::Rect(dest.x, dest.y, dest.w, dest.h), + os::Sampling(os::Sampling::Filter::Nearest), + &p); } } diff --git a/src/ui/graphics.cpp b/src/ui/graphics.cpp index bd6b537c9..2a18612ed 100644 --- a/src/ui/graphics.cpp +++ b/src/ui/graphics.cpp @@ -1,5 +1,5 @@ // Aseprite UI Library -// Copyright (C) 2019-2022 Igara Studio S.A. +// Copyright (C) 2019-2024 Igara Studio S.A. // Copyright (C) 2001-2018 David Capello // // This file is released under the terms of the MIT license. @@ -329,15 +329,6 @@ void Graphics::drawSurfaceNine(os::Surface* surface, m_surface->drawSurfaceNine(surface, src, center, displacedDst, drawCenter, paint); } -void Graphics::blit(os::Surface* srcSurface, int srcx, int srcy, int dstx, int dsty, int w, int h) -{ - dirty(gfx::Rect(m_dx+dstx, m_dy+dsty, w, h)); - - os::SurfaceLock lockSrc(srcSurface); - os::SurfaceLock lockDst(m_surface.get()); - srcSurface->blitTo(m_surface.get(), srcx, srcy, m_dx+dstx, m_dy+dsty, w, h); -} - void Graphics::setFont(const os::FontRef& font) { m_font = font; diff --git a/src/ui/graphics.h b/src/ui/graphics.h index 1be3d8dcc..2b395367e 100644 --- a/src/ui/graphics.h +++ b/src/ui/graphics.h @@ -1,5 +1,5 @@ // Aseprite UI Library -// Copyright (C) 2019-2022 Igara Studio S.A. +// Copyright (C) 2019-2024 Igara Studio S.A. // Copyright (C) 2001-2018 David Capello // // This file is released under the terms of the MIT license. @@ -96,8 +96,6 @@ namespace ui { const bool drawCenter, const Paint* paint = nullptr); - void blit(os::Surface* src, int srcx, int srcy, int dstx, int dsty, int w, int h); - // ====================================================================== // FONT & TEXT // ======================================================================