зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 6c1cf4694a13 for not building on windows and android
This commit is contained in:
Родитель
47b801fa22
Коммит
426d89524a
|
@ -74,7 +74,6 @@
|
|||
#include "nsIScriptError.h"
|
||||
#include "nsIAppShell.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "mozilla/layers/CompositorParent.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
@ -2372,9 +2371,7 @@ nsDOMWindowUtils::AdvanceTimeAndRefresh(int64_t aMilliseconds)
|
|||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
|
||||
nsRefreshDriver* driver = GetPresContext()->RefreshDriver();
|
||||
driver->AdvanceTimeAndRefresh(aMilliseconds);
|
||||
CompositorParent::SetTimeAndSampleAnimations(driver->MostRecentRefresh(), true);
|
||||
GetPresContext()->RefreshDriver()->AdvanceTimeAndRefresh(aMilliseconds);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -2386,9 +2383,7 @@ nsDOMWindowUtils::RestoreNormalRefresh()
|
|||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
|
||||
nsRefreshDriver* driver = GetPresContext()->RefreshDriver();
|
||||
driver->RestoreNormalRefresh();
|
||||
CompositorParent::SetTimeAndSampleAnimations(driver->MostRecentRefresh(), false);
|
||||
GetPresContext()->RefreshDriver()->RestoreNormalRefresh();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -529,11 +529,12 @@ AsyncCompositionManager::TransformScrollableLayer(Layer* aLayer, const gfx3DMatr
|
|||
bool
|
||||
AsyncCompositionManager::TransformShadowTree(TimeStamp aCurrentFrame)
|
||||
{
|
||||
bool wantNextFrame = false;
|
||||
Layer* root = mLayerManager->GetRoot();
|
||||
|
||||
// NB: we must sample animations *before* sampling pan/zoom
|
||||
// transforms.
|
||||
bool wantNextFrame = SampleAnimations(root, aCurrentFrame);
|
||||
wantNextFrame |= SampleAnimations(root, aCurrentFrame);
|
||||
|
||||
const gfx3DMatrix& rootTransform = root->GetTransform();
|
||||
|
||||
|
|
|
@ -134,7 +134,6 @@ CompositorParent::CompositorParent(nsIWidget* aWidget,
|
|||
int aSurfaceWidth, int aSurfaceHeight)
|
||||
: mWidget(aWidget)
|
||||
, mCurrentCompositeTask(NULL)
|
||||
, mIsTesting(false)
|
||||
, mPaused(false)
|
||||
, mUseExternalSurfaceSize(aUseExternalSurfaceSize)
|
||||
, mEGLSurfaceSize(aSurfaceWidth, aSurfaceHeight)
|
||||
|
@ -452,8 +451,7 @@ CompositorParent::Composite()
|
|||
}
|
||||
}
|
||||
|
||||
TimeStamp time = mIsTesting ? mTestTime : mLastCompose;
|
||||
bool requestNextFrame = mCompositionManager->TransformShadowTree(time);
|
||||
bool requestNextFrame = mCompositionManager->TransformShadowTree(mLastCompose);
|
||||
if (requestNextFrame) {
|
||||
ScheduleComposition();
|
||||
}
|
||||
|
@ -652,19 +650,6 @@ CompositorParent* CompositorParent::RemoveCompositor(uint64_t id)
|
|||
return retval;
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
CompositorParent::SetTimeAndSampleAnimations(TimeStamp aTime, bool aIsTesting)
|
||||
{
|
||||
if (!sCompositorMap) {
|
||||
return;
|
||||
}
|
||||
for (CompositorMap::iterator it = sCompositorMap->begin(); it != sCompositorMap->end(); ++it) {
|
||||
it->second->mIsTesting = aIsTesting;
|
||||
it->second->mTestTime = aTime;
|
||||
it->second->mCompositionManager->TransformShadowTree(aTime);
|
||||
}
|
||||
}
|
||||
|
||||
typedef map<uint64_t, CompositorParent::LayerTreeState> LayerTreeMap;
|
||||
static LayerTreeMap sIndirectLayerTrees;
|
||||
|
||||
|
|
|
@ -163,15 +163,6 @@ public:
|
|||
*/
|
||||
static const LayerTreeState* GetIndirectShadowTree(uint64_t aId);
|
||||
|
||||
/**
|
||||
* Tell all CompositorParents to update their last refresh to aTime and sample
|
||||
* animations at this time stamp. If aIsTesting is true, the
|
||||
* CompositorParents will become "paused" and continue sampling animations at
|
||||
* this time stamp until this function is called again with aIsTesting set to
|
||||
* false.
|
||||
*/
|
||||
static void SetTimeAndSampleAnimations(TimeStamp aTime, bool aIsTesting);
|
||||
|
||||
protected:
|
||||
virtual PLayerTransactionParent*
|
||||
AllocPLayerTransaction(const LayersBackend& aBackendHint,
|
||||
|
@ -242,8 +233,6 @@ private:
|
|||
nsIWidget* mWidget;
|
||||
CancelableTask *mCurrentCompositeTask;
|
||||
TimeStamp mLastCompose;
|
||||
TimeStamp mTestTime;
|
||||
bool mIsTesting;
|
||||
#ifdef COMPOSITOR_PERFORMANCE_WARNING
|
||||
TimeStamp mExpectedComposeTime;
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче