fix(draw_kit): reclaim 4x waveform oversample; relocate waveformColumnCount to component_geometry

kWaveformOversample set to 1 (was 4) — overbinning produced byte-identical pixels because columnMinMax exact partition already makes the draw gap-free. Comments credit columnMinMax, not oversampling.
This commit is contained in:
2026-07-27 19:37:53 -04:00
parent b3c9fad9ba
commit 1e645adcef
7 changed files with 67 additions and 40 deletions
+6 -6
View File
@@ -13,8 +13,8 @@
// LICE-drawn named-banks tab-page region below (one tab per named bank, an
// overflow/scroll strip), and two full-height toggles that collapse the split.
// Each region reuses the M5 grid render loop (waveform thumbnails / empty state).
// * per-sample PCM read via PCM_source fed to peaks::computeEnvelope, oversampled
// (kWaveformOversample bins per drawn pixel column) for the FA3 gap-free draw.
// * per-sample PCM read via PCM_source fed to peaks::computeEnvelope, one bin per
// drawn pixel column; drawWaveform's gap-free render comes from peaks::columnMinMax.
// * an in-memory thumbnail cache keyed by (sample id, draw width, bank generation).
// * id-keyed bank management (create / rename / delete / evacuate / activate) and
// sample move/copy — driven from a tab context menu and a drag — against the B1
@@ -1350,10 +1350,10 @@ void drawRegionGrid(LICE_IBitmap* bmp, const RECT& region, bool isBanks,
// BankIndex insertion order. Selection/focus are keyed by the occupied-ordinal (selection
// space); a slot maps back to its ordinal via selectionForSlot.
const RegionDisplay disp = regionDisplay(region, isBanks, reg);
// FA3 anti-alias: thumbnails are computed OVERSAMPLED — kWaveformOversample bins per
// drawn pixel column — and drawWaveform collapses them per column (peaks::columnMinMax)
// so steep transients render as true full-height spans. computeThumbnail clamps the
// request to the frame count.
// FA3 gap-free: request one bin per drawn pixel column; drawWaveform's
// peaks::columnMinMax exact partition makes every column gap-free — overbinning
// produces byte-identical pixels at higher memory/CPU cost. computeThumbnail clamps
// the request to the frame count.
const int binWidth = kWaveformOversample *
waveformColumnCount(KitBox{0, 0, kGrid.cellWidth, kGrid.cellHeight});
for (const SlotCellRect& r : disp.slotRects) {