DrawData is passed to main draw function

This commit is contained in:
Yousef Khadadeh 2026-02-25 13:26:35 +03:00
parent 8ce9bd8aa3
commit 23dbfcfede
13 changed files with 86 additions and 111 deletions

View file

@ -204,7 +204,7 @@ void ImageResourceDisplay::draw(SkCanvas* canvas, const DrawData& drawData, cons
unsigned mipmapLevel = get_exact_mipmap_level_for_dimensions({imRectPixelSize.width(), imRectPixelSize.height()});
auto& frame = frames[frameIndex];
unsigned closestMipmapLevel = get_best_allocated_mipmap_level(mipmapLevel);
if(drawData.main->takingScreenshot) {
if(drawData.takingScreenshot) {
if(closestMipmapLevel == mipmapLevel) {
if(closestMipmapLevel == get_smallest_mipmap_level())
canvas->drawImageRect(frame.smallestMipmapLevel, imRect, {SkFilterMode::kLinear, SkMipmapMode::kLinear});