зеркало из https://github.com/mozilla/gecko-dev.git
Don't query gfxPlatform for the vsync rate in CompositorBridgeParent. (bug 1312835, r=mattwoodrow)
--HG-- extra : rebase_source : 152bb6f146dc452d239fa7a90fcdcda3311d52de
This commit is contained in:
Родитель
938166ed49
Коммит
d0a9a85fba
|
@ -257,15 +257,6 @@ CompositorBridgeParent::ForEachIndirectLayerTree(const Lambda& aCallback)
|
|||
typedef map<uint64_t,CompositorBridgeParent*> CompositorMap;
|
||||
static StaticAutoPtr<CompositorMap> sCompositorMap;
|
||||
|
||||
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
|
||||
static TimeDuration
|
||||
GetGlobalVsyncRate()
|
||||
{
|
||||
return gfxPlatform::GetPlatform()->GetHardwareVsync()->
|
||||
GetGlobalDisplay().GetVsyncRate();
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
CompositorBridgeParent::Setup()
|
||||
{
|
||||
|
@ -1358,8 +1349,7 @@ CompositorBridgeParent::CompositeToTarget(DrawTarget* aTarget, const gfx::IntRec
|
|||
// If we have visible windowed plugins then we need to wait for content (and
|
||||
// then the plugins) to have been updated by the active animation.
|
||||
if (!mPluginWindowsHidden && mCachedPluginData.Length()) {
|
||||
mWaitForPluginsUntil = mCompositorScheduler->GetLastComposeTime()
|
||||
+ (GetGlobalVsyncRate() * 2);
|
||||
mWaitForPluginsUntil = mCompositorScheduler->GetLastComposeTime() + (mVsyncRate * 2);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -2926,7 +2916,7 @@ CompositorBridgeParent::HideAllPluginWindows()
|
|||
|
||||
#if defined(XP_WIN)
|
||||
// We will get an async reply that this has happened and then send hide.
|
||||
mWaitForPluginsUntil = TimeStamp::Now() + GetGlobalVsyncRate();
|
||||
mWaitForPluginsUntil = TimeStamp::Now() + mVsyncRate;
|
||||
Unused << SendCaptureAllPlugins(parentWidget);
|
||||
#else
|
||||
Unused << SendHideAllPlugins(parentWidget);
|
||||
|
|
|
@ -607,7 +607,9 @@ static uint32_t GetSkiaGlyphCacheSize()
|
|||
void
|
||||
gfxPlatform::Init()
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(!XRE_IsGPUProcess(), "GFX: Not allowed in GPU process.");
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread(), "GFX: Not in main thread.");
|
||||
|
||||
if (gEverInitialized) {
|
||||
NS_RUNTIMEABORT("Already started???");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче