mirror of
http://git.mos6581.com/ManchildProductions/Male-Poon.git
synced 2026-05-26 17:11:32 +00:00
Stop trying to apply HQ scaling on ridiculously-sized (>64Mpix) images since it'll cause OOM crashes.
Too-large images won't use HQ scaling and also won't display at 1:1 zoom because we simply don't have the surface cache space available for that kind of out-of-scope image. It will allow the user to save such images to disk and view in specialized software.
This commit is contained in:
@@ -836,7 +836,13 @@ imgFrame::LockImageData()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return Deoptimize();
|
||||
double imgPixelSize = mSize.width * mSize.height;
|
||||
if (imgPixelSize < (8092 * 8092)) {
|
||||
// We should be safe to Deoptimize at this size (<64Mpix)
|
||||
return Deoptimize();
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
||||
Reference in New Issue
Block a user