Sanitize alpha channel only if actually broken

Authored by broulik on Jan 23 2018, 9:37 AM.



Doing that is quite expensive (70ms+ on my machine), so check a couple of pixels first before actually doing that.

Test Plan

I never actually had a case where alpha channel would mismatch, small previews were always fine, so please test

Diff Detail

R166 Spectacle
Lint Skipped
Unit Tests Skipped
broulik requested review of this revision.Jan 23 2018, 9:37 AM
broulik created this revision.
broulik retitled this revision from Sanitize alpha channel if actually broken to Sanitize alpha channel only if actually broken.

The code was added to fix a bug,

That seemed to be caused (or triggered?) by small rectangular selections, so perhaps this sanitization condition could be changed to detect whether the preview area is smaller?

broulik planned changes to this revision.Jan 23 2018, 5:19 PM
broulik abandoned this revision.May 29 2020, 7:07 AM
broulik added a subscriber: davidre.

@davidre said something about that we don't show small thumbnails anymore anyway or something

Restricted Application added a project: Spectacle. · View Herald TranscriptMay 29 2020, 7:07 AM
Restricted Application added a subscriber: Spectacle. · View Herald Transcript