mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Bug 1034345 (Part 3) - Implement OptimalImageSizeForDest for VectorImage. r=dholbert
--HG-- extra : rebase_source : 664f6a978ea69c438535900531c39e23f505e764
This commit is contained in:
parent
5f4250d96a
commit
f0f537417b
@ -1220,6 +1220,17 @@ VectorImage::InvalidateObserversOnNextRefreshDriverTick()
|
||||
}
|
||||
}
|
||||
|
||||
nsIntSize
|
||||
VectorImage::OptimalImageSizeForDest(const gfxSize& aDest, uint32_t aWhichFrame, GraphicsFilter aFilter, uint32_t aFlags)
|
||||
{
|
||||
MOZ_ASSERT(aDest.width >= 0 || ceil(aDest.width) <= INT32_MAX ||
|
||||
aDest.height >= 0 || ceil(aDest.height) <= INT32_MAX,
|
||||
"Unexpected destination size");
|
||||
|
||||
// We can rescale SVGs freely, so just return the provided destination size.
|
||||
return nsIntSize(ceil(aDest.width), ceil(aDest.height));
|
||||
}
|
||||
|
||||
already_AddRefed<imgIContainer>
|
||||
VectorImage::Unwrap()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user