Bug 1225934 - Never allow surface substitution when FLAG_HIGH_QUALITY_SCALING is disabled. r=tn

This commit is contained in:
Seth Fowler 2016-03-07 17:17:16 -08:00
parent 5a675c9ccb
commit b935d483a8

View File

@ -290,9 +290,10 @@ RasterImage::LookupFrameInternal(uint32_t aFrameNum,
SurfaceFlags surfaceFlags = ToSurfaceFlags(aFlags);
// We don't want any substitution for sync decodes, so we use
// We don't want any substitution for sync decodes, and substitution would be
// illegal when high quality downscaling is disabled, so we use
// SurfaceCache::Lookup in this case.
if (aFlags & FLAG_SYNC_DECODE) {
if ((aFlags & FLAG_SYNC_DECODE) || !(aFlags & FLAG_HIGH_QUALITY_SCALING)) {
return SurfaceCache::Lookup(ImageKey(this),
RasterSurfaceKey(aSize,
surfaceFlags,