mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
6fd9a39304
- Backout a6dbd23da598 (bug 1139283) since it is currently not needed. (198e8a831)
- Bug 1168242 - Simplify the logic in nsDisplayTransform::GetResultingTransformMatrixInternal. r=mattwoodrow (e521f8d70)
- Bug 1156393 - Cache nsDisplayBorder bounds. r=roc (1908a4347)
- Bug 1159053 - Cache SVG getBBox and objectBoundingBox calculations for better performance. r=heycam (7e4c64f0e)
- Bug 923193, part 1 - Avoid calculation of the reference box for transforms unless they're actually needed. r=roc (b22a65280)
- Bug 923193 - Avoid calling GetDeltaToPerspectiveOrigin for elements that don't have perspective. r=heycam (c964ee840)
- Bug 923193, part 2 - Add a pref for supporting 'transform-origin' in SVG. r=heycam (569e56b07)
- Bug 923193, part 3 - Add the style system code to support the 'transform-box' property. r=heycam (0f4052ac9)
- Bug 889085 - Make sheets styled with '-moz-appearance: dialog;' vibrant/semi-transparent. r=mstange, roc. (60ecc9d4f)
- Bug 1163878 (Part 1) - Add an IsImageContainerAvailable method to imgIContainer. r=tn (979baab3f)
- Bug 1163878 (Part 2) - Use IsImageContainerAvailable() when making layerization decisions and only call GetImageContainer() if we layerize. r=tn (65fdf9cf9)
- Bug 1163878 (Followup) - Fix a warning about implicit conversion of nullptr to bool in FrameLayerBuilder on a CLOSED TREE. r=me (f41597972)
- Bug 1168245 - Remove some code that appears to make no sense from nsDisplayTransform::GetDeltaToTransformOrigin. r=mattwoodrow (296b96eb7)
- Bug 923193, part 4 - Implement support for the 'transform-origin' property in SVG. r=heycam (eac8cced1)
- Bug 923193, part 5 - Tests for the 'transform-origin' and 'transform-box' properties in SVG. r=heycam (8053d538b)
113 lines
2.7 KiB
C++
113 lines
2.7 KiB
C++
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "FrozenImage.h"
|
|
|
|
namespace mozilla {
|
|
|
|
using namespace gfx;
|
|
|
|
namespace image {
|
|
|
|
NS_IMPL_ISUPPORTS_INHERITED0(FrozenImage, ImageWrapper)
|
|
|
|
void
|
|
FrozenImage::IncrementAnimationConsumers()
|
|
{
|
|
// Do nothing. This will prevent animation from starting if there are no other
|
|
// instances of this image.
|
|
}
|
|
|
|
void
|
|
FrozenImage::DecrementAnimationConsumers()
|
|
{
|
|
// Do nothing.
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
FrozenImage::GetAnimated(bool* aAnimated)
|
|
{
|
|
bool dummy;
|
|
nsresult rv = InnerImage()->GetAnimated(&dummy);
|
|
if (NS_SUCCEEDED(rv)) {
|
|
*aAnimated = false;
|
|
}
|
|
return rv;
|
|
}
|
|
|
|
NS_IMETHODIMP_(already_AddRefed<SourceSurface>)
|
|
FrozenImage::GetFrame(uint32_t aWhichFrame,
|
|
uint32_t aFlags)
|
|
{
|
|
return InnerImage()->GetFrame(FRAME_FIRST, aFlags);
|
|
}
|
|
|
|
NS_IMETHODIMP_(bool)
|
|
FrozenImage::IsImageContainerAvailable(LayerManager* aManager, uint32_t aFlags)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
NS_IMETHODIMP_(already_AddRefed<ImageContainer>)
|
|
FrozenImage::GetImageContainer(layers::LayerManager* aManager, uint32_t aFlags)
|
|
{
|
|
// XXX(seth): GetImageContainer does not currently support anything but the
|
|
// current frame. We work around this by always returning null, but if it ever
|
|
// turns out that FrozenImage is widely used on codepaths that can actually
|
|
// benefit from GetImageContainer, it would be a good idea to fix that method
|
|
// for performance reasons.
|
|
return nullptr;
|
|
}
|
|
|
|
NS_IMETHODIMP_(DrawResult)
|
|
FrozenImage::Draw(gfxContext* aContext,
|
|
const nsIntSize& aSize,
|
|
const ImageRegion& aRegion,
|
|
uint32_t /* aWhichFrame - ignored */,
|
|
GraphicsFilter aFilter,
|
|
const Maybe<SVGImageContext>& aSVGContext,
|
|
uint32_t aFlags)
|
|
{
|
|
return InnerImage()->Draw(aContext, aSize, aRegion, FRAME_FIRST,
|
|
aFilter, aSVGContext, aFlags);
|
|
}
|
|
|
|
NS_IMETHODIMP_(void)
|
|
FrozenImage::RequestRefresh(const TimeStamp& aTime)
|
|
{
|
|
// Do nothing.
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
FrozenImage::GetAnimationMode(uint16_t* aAnimationMode)
|
|
{
|
|
*aAnimationMode = kNormalAnimMode;
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
FrozenImage::SetAnimationMode(uint16_t aAnimationMode)
|
|
{
|
|
// Do nothing.
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
FrozenImage::ResetAnimation()
|
|
{
|
|
// Do nothing.
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP_(float)
|
|
FrozenImage::GetFrameIndex(uint32_t aWhichFrame)
|
|
{
|
|
MOZ_ASSERT(aWhichFrame <= FRAME_MAX_VALUE, "Invalid argument");
|
|
return 0;
|
|
}
|
|
|
|
} // namespace image
|
|
} // namespace mozilla
|