зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1435456 - Remove asserts checking that downscale-on-decode is enabled. r=tnikkel
These asserts are somewhat faulty given the image.downscale-during-decode.enabled preference is a live preference and thus can change at any time. Given the decision to downscale is made on the main thread, and it is asserted on a decoder thread, this will always be inherently racy. Most of the time this isn't a problem, but with our automated tests, we frequently flip this preference, and the assertion may fail unnecessarily with an unrelated image. The reftests themselves verify downscaling did or did not occur based upon comparison to the reference, and don't require the assert for verification.
This commit is contained in:
Родитель
19738f789f
Коммит
f229366eba
|
@ -27,8 +27,6 @@ Downscaler::Downscaler(const nsIntSize& aTargetSize)
|
|||
, mHasAlpha(true)
|
||||
, mFlipVertically(false)
|
||||
{
|
||||
MOZ_ASSERT(gfxPrefs::ImageDownscaleDuringDecodeEnabled(),
|
||||
"Downscaling even though downscale-during-decode is disabled?");
|
||||
MOZ_ASSERT(mTargetSize.width > 0 && mTargetSize.height > 0,
|
||||
"Invalid target size");
|
||||
}
|
||||
|
|
|
@ -98,10 +98,7 @@ public:
|
|||
, mInputRow(0)
|
||||
, mOutputRow(0)
|
||||
, mHasAlpha(true)
|
||||
{
|
||||
MOZ_ASSERT(gfxPrefs::ImageDownscaleDuringDecodeEnabled(),
|
||||
"Downscaling even though downscale-during-decode is disabled?");
|
||||
}
|
||||
{ }
|
||||
|
||||
~DownscalingFilter()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче