зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset c2b8107d8468 (bug 1321412)
This commit is contained in:
Родитель
5cf78e61d1
Коммит
380e39c664
|
@ -5743,7 +5743,7 @@ nsDisplayTransform::nsDisplayTransform(nsDisplayListBuilder* aBuilder,
|
|||
, mNoExtendContext(false)
|
||||
, mIsTransformSeparator(false)
|
||||
, mTransformPreserves3DInited(false)
|
||||
, mAllowAsyncAnimation(false)
|
||||
, mIsFullyVisible(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsDisplayTransform);
|
||||
MOZ_ASSERT(aFrame, "Must have a frame!");
|
||||
|
@ -5799,7 +5799,7 @@ nsDisplayTransform::nsDisplayTransform(nsDisplayListBuilder* aBuilder,
|
|||
nsIFrame *aFrame, nsDisplayList *aList,
|
||||
const nsRect& aChildrenVisibleRect,
|
||||
uint32_t aIndex,
|
||||
bool aAllowAsyncAnimation)
|
||||
bool aIsFullyVisible)
|
||||
: nsDisplayItem(aBuilder, aFrame)
|
||||
, mStoredList(aBuilder, aFrame, aList)
|
||||
, mTransformGetter(nullptr)
|
||||
|
@ -5810,7 +5810,7 @@ nsDisplayTransform::nsDisplayTransform(nsDisplayListBuilder* aBuilder,
|
|||
, mNoExtendContext(false)
|
||||
, mIsTransformSeparator(false)
|
||||
, mTransformPreserves3DInited(false)
|
||||
, mAllowAsyncAnimation(aAllowAsyncAnimation)
|
||||
, mIsFullyVisible(aIsFullyVisible)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsDisplayTransform);
|
||||
MOZ_ASSERT(aFrame, "Must have a frame!");
|
||||
|
@ -5833,7 +5833,7 @@ nsDisplayTransform::nsDisplayTransform(nsDisplayListBuilder* aBuilder,
|
|||
, mNoExtendContext(false)
|
||||
, mIsTransformSeparator(false)
|
||||
, mTransformPreserves3DInited(false)
|
||||
, mAllowAsyncAnimation(false)
|
||||
, mIsFullyVisible(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsDisplayTransform);
|
||||
MOZ_ASSERT(aFrame, "Must have a frame!");
|
||||
|
@ -5857,7 +5857,7 @@ nsDisplayTransform::nsDisplayTransform(nsDisplayListBuilder* aBuilder,
|
|||
, mNoExtendContext(false)
|
||||
, mIsTransformSeparator(true)
|
||||
, mTransformPreserves3DInited(false)
|
||||
, mAllowAsyncAnimation(false)
|
||||
, mIsFullyVisible(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsDisplayTransform);
|
||||
MOZ_ASSERT(aFrame, "Must have a frame!");
|
||||
|
@ -6223,7 +6223,7 @@ nsDisplayOpacity::CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder)
|
|||
bool
|
||||
nsDisplayTransform::CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder)
|
||||
{
|
||||
return mAllowAsyncAnimation;
|
||||
return mIsFullyVisible;
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
|
@ -6400,7 +6400,7 @@ already_AddRefed<Layer> nsDisplayTransform::BuildLayer(nsDisplayListBuilder *aBu
|
|||
nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(container, aBuilder,
|
||||
this, mFrame,
|
||||
eCSSProperty_transform);
|
||||
if (mAllowAsyncAnimation && MayBeAnimated(aBuilder)) {
|
||||
if (mIsFullyVisible && MayBeAnimated(aBuilder)) {
|
||||
// Only allow async updates to the transform if we're an animated layer, since that's what
|
||||
// triggers us to set the correct AGR in the constructor and makes sure FrameLayerBuilder
|
||||
// won't compute occlusions for this layer.
|
||||
|
|
|
@ -4077,7 +4077,7 @@ public:
|
|||
*/
|
||||
nsDisplayTransform(nsDisplayListBuilder* aBuilder, nsIFrame *aFrame,
|
||||
nsDisplayList *aList, const nsRect& aChildrenVisibleRect,
|
||||
uint32_t aIndex = 0, bool aAllowAsyncAnimation = false);
|
||||
uint32_t aIndex = 0, bool aIsFullyVisible = false);
|
||||
nsDisplayTransform(nsDisplayListBuilder* aBuilder, nsIFrame *aFrame,
|
||||
nsDisplayItem *aItem, const nsRect& aChildrenVisibleRect,
|
||||
uint32_t aIndex = 0);
|
||||
|
@ -4380,8 +4380,9 @@ private:
|
|||
bool mIsTransformSeparator;
|
||||
// True if mTransformPreserves3D have been initialized.
|
||||
bool mTransformPreserves3DInited;
|
||||
// True if async animation of the transform is allowed.
|
||||
bool mAllowAsyncAnimation;
|
||||
// True if the entire untransformed area has been treated as
|
||||
// visible during display list construction.
|
||||
bool mIsFullyVisible;
|
||||
};
|
||||
|
||||
/* A display item that applies a perspective transformation to a single
|
||||
|
|
Загрузка…
Ссылка в новой задаче