13.19e: 70318de verified; the Smear's allocation guards starved in WarpFailureTests; the commit's thinning and the bar's deferred finish pinned

This commit is contained in:
ZacharyZhang-NY committed 2026-10-03 20:08:40 -04:00
1 parent 3757eb8910
commit 1de10e711c
7 files changed
+142 -7

No files matched your search

+3 -3
View File
@@ -55,7 +55,7 @@ std::optional<BrushStroke::Clone> EditorSession::blurSample(const BrushStroke &s
const double margin = std::ceil(3 * sigma);
const QRectF region = stroke.sourceRect.adjusted(-margin, -margin, margin, margin);
// A huge layer's sample is made coarser, within several canvases.
const qint64 canvas = m_document ? qint64(m_document->width) * m_document->height : 0;
const qint64 canvas = qint64(m_document.value().width) * m_document.value().height;
const double budget = double(std::min(DocumentLimits::maxSurfacePixels, std::max<qint64>(16'000'000, 4 * canvas)));
const double fit = std::min(1.0, std::sqrt(budget / (region.width() * region.height())));
const int width = std::max(1, int(std::ceil(region.width() * fit))), height = std::max(1, int(std::ceil(region.height() * fit)));
@@ -63,8 +63,8 @@ std::optional<BrushStroke::Clone> EditorSession::blurSample(const BrushStroke &s
try {
QImage context = BrushRaster::context(width, height, stroke.isMask);
// Past its pixels a mask keeps its edge tone.
if (stroke.isMask && layer.mask)
context.fill(int(std::round(LayerMask::background(layer.mask->asset.thumbnail) * 255)));
if (stroke.isMask)
context.fill(int(std::round(LayerMask::background(asset->thumbnail) * 255)));
QPainter painter(&context);
// A painted asset flattens here; the catch covers it too.
BrushRaster::draw(asset->image(), placed, painter);