Bug 966679 - Follow-up to fix bustage on gcc 4.4, split Compose() into separate functions. CLOSED TREE

This commit is contained in:
Matt Woodrow 2014-02-11 17:58:01 +13:00
Родитель 0c56212664
Коммит e58d379984
2 изменённых файлов: 17 добавлений и 10 удалений

Просмотреть файл

@ -318,7 +318,7 @@ CompositorParent::RecvMakeSnapshot(const SurfaceDescriptor& aInSnapshot,
// do better if AutoOpenSurface uses Moz2D directly.
RefPtr<DrawTarget> target =
gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(opener.Get(), size);
ComposeToTarget(target);
ForceComposeToTarget(target);
*aOutSnapshot = aInSnapshot;
return true;
}
@ -330,7 +330,7 @@ CompositorParent::RecvFlushRendering()
// and do it immediately instead.
if (mCurrentCompositeTask) {
mCurrentCompositeTask->Cancel();
ComposeToTarget(nullptr);
ForceComposeToTarget(nullptr);
}
return true;
}
@ -433,7 +433,7 @@ CompositorParent::ResumeComposition()
mPaused = false;
Composite(nullptr);
Composite();
// if anyone's waiting to make sure that composition really got resumed, tell them
lock.NotifyAll();
@ -565,7 +565,7 @@ CompositorParent::ScheduleComposition()
mExpectedComposeTime = TimeStamp::Now() + minFrameDelta;
#endif
mCurrentCompositeTask = NewRunnableMethod(this, &CompositorParent::Composite, nullptr);
mCurrentCompositeTask = NewRunnableMethod(this, &CompositorParent::Composite);
if (!initialComposition && delta < minFrameDelta) {
TimeDuration delay = minFrameDelta - delta;
@ -579,7 +579,13 @@ CompositorParent::ScheduleComposition()
}
void
CompositorParent::Composite(DrawTarget* aTarget)
CompositorParent::Composite()
{
CompositeToTarget(nullptr);
}
void
CompositorParent::CompositeToTarget(DrawTarget* aTarget)
{
profiler_tracing("Paint", "Composite", TRACING_INTERVAL_START);
PROFILER_LABEL("CompositorParent", "Composite");
@ -651,13 +657,13 @@ CompositorParent::Composite(DrawTarget* aTarget)
}
void
CompositorParent::ComposeToTarget(DrawTarget* aTarget)
CompositorParent::ForceComposeToTarget(DrawTarget* aTarget)
{
PROFILER_LABEL("CompositorParent", "ComposeToTarget");
PROFILER_LABEL("CompositorParent", "ForceComposeToTarget");
AutoRestore<bool> override(mOverrideComposeReadiness);
mOverrideComposeReadiness = true;
Composite(aTarget);
CompositeToTarget(aTarget);
}
bool

Просмотреть файл

@ -243,8 +243,9 @@ protected:
bool* aSuccess) MOZ_OVERRIDE;
virtual bool DeallocPLayerTransactionParent(PLayerTransactionParent* aLayers) MOZ_OVERRIDE;
virtual void ScheduleTask(CancelableTask*, int);
void Composite(gfx::DrawTarget* aTarget);
virtual void ComposeToTarget(gfx::DrawTarget* aTarget);
void Composite();
void CompositeToTarget(gfx::DrawTarget* aTarget);
void ForceComposeToTarget(gfx::DrawTarget* aTarget);
void SetEGLSurfaceSize(int width, int height);