Bug 1181303. Set composition time earlier so that computing invalid regions works properly. r=mattwoodrow

This commit is contained in:
Robert O'Callahan 2015-07-08 08:50:29 +12:00
parent 8441769275
commit 3d3268c3c1

View File

@ -272,6 +272,11 @@ LayerManagerComposite::EndTransaction(const TimeStamp& aTimeStamp,
return;
}
// Set composition timestamp here because we need it in
// ComputeEffectiveTransforms (so the correct video frame size is picked) and
// also to compute invalid regions properly.
mCompositor->SetCompositionTime(aTimeStamp);
if (mRoot && mClonedLayerTreeProperties) {
MOZ_ASSERT(!mTarget);
nsIntRegion invalid =
@ -290,9 +295,6 @@ LayerManagerComposite::EndTransaction(const TimeStamp& aTimeStamp,
if (mRoot && !(aFlags & END_NO_IMMEDIATE_REDRAW)) {
MOZ_ASSERT(!aTimeStamp.IsNull());
// Set composition timestamp here because we need it in
// ComputeEffectiveTransforms (so the correct video frame size is picked)
mCompositor->SetCompositionTime(aTimeStamp);
// The results of our drawing always go directly into a pixel buffer,
// so we don't need to pass any global transform here.
mRoot->ComputeEffectiveTransforms(gfx::Matrix4x4());