зеркало из https://github.com/mozilla/gecko-dev.git
Bug 977891 - Move the ForceComposite message to PLayerTransaction so that we can identify the right compositor with e10s. r=nical
This commit is contained in:
Родитель
e2d421167e
Коммит
d72b420dc7
|
@ -259,8 +259,8 @@ ClientLayerManager::GetRemoteRenderer()
|
|||
void
|
||||
ClientLayerManager::Composite()
|
||||
{
|
||||
if (CompositorChild* remoteRenderer = GetRemoteRenderer()) {
|
||||
remoteRenderer->SendForceComposite();
|
||||
if (LayerTransactionChild* manager = mForwarder->GetShadowManager()) {
|
||||
manager->SendForceComposite();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -337,13 +337,6 @@ CompositorParent::RecvFlushRendering()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CompositorParent::RecvForceComposite()
|
||||
{
|
||||
ScheduleComposition();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CompositorParent::RecvNotifyRegionInvalidated(const nsIntRegion& aRegion)
|
||||
{
|
||||
|
@ -758,6 +751,12 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
|||
mLayerManager->NotifyShadowTreeTransaction();
|
||||
}
|
||||
|
||||
void
|
||||
CompositorParent::ForceComposite(LayerTransactionParent* aLayerTree)
|
||||
{
|
||||
ScheduleComposition();
|
||||
}
|
||||
|
||||
void
|
||||
CompositorParent::InitializeLayerManager(const nsTArray<LayersBackend>& aBackendHints)
|
||||
{
|
||||
|
@ -1017,7 +1016,6 @@ public:
|
|||
SurfaceDescriptor* aOutSnapshot)
|
||||
{ return true; }
|
||||
virtual bool RecvFlushRendering() MOZ_OVERRIDE { return true; }
|
||||
virtual bool RecvForceComposite() MOZ_OVERRIDE { return true; }
|
||||
virtual bool RecvNotifyRegionInvalidated(const nsIntRegion& aRegion) { return true; }
|
||||
virtual bool RecvStartFrameTimeRecording(const int32_t& aBufferSize, uint32_t* aOutStartIndex) MOZ_OVERRIDE { return true; }
|
||||
virtual bool RecvStopFrameTimeRecording(const uint32_t& aStartIndex, InfallibleTArray<float>* intervals) MOZ_OVERRIDE { return true; }
|
||||
|
@ -1036,6 +1034,7 @@ public:
|
|||
const TargetConfig& aTargetConfig,
|
||||
bool aIsFirstPaint,
|
||||
bool aScheduleComposite) MOZ_OVERRIDE;
|
||||
virtual void ForceComposite(LayerTransactionParent* aLayerTree) MOZ_OVERRIDE;
|
||||
|
||||
virtual AsyncCompositionManager* GetCompositionManager(LayerTransactionParent* aParent) MOZ_OVERRIDE;
|
||||
|
||||
|
@ -1188,6 +1187,14 @@ CrossProcessCompositorParent::ShadowLayersUpdated(
|
|||
sIndirectLayerTrees[id].mParent->NotifyShadowTreeTransaction(id, aIsFirstPaint, aScheduleComposite);
|
||||
}
|
||||
|
||||
void
|
||||
CrossProcessCompositorParent::ForceComposite(LayerTransactionParent* aLayerTree)
|
||||
{
|
||||
uint64_t id = aLayerTree->GetId();
|
||||
MOZ_ASSERT(id != 0);
|
||||
sIndirectLayerTrees[id].mParent->ForceComposite(aLayerTree);
|
||||
}
|
||||
|
||||
AsyncCompositionManager*
|
||||
CrossProcessCompositorParent::GetCompositionManager(LayerTransactionParent* aLayerTree)
|
||||
{
|
||||
|
|
|
@ -88,7 +88,6 @@ public:
|
|||
virtual bool RecvMakeSnapshot(const SurfaceDescriptor& aInSnapshot,
|
||||
SurfaceDescriptor* aOutSnapshot) MOZ_OVERRIDE;
|
||||
virtual bool RecvFlushRendering() MOZ_OVERRIDE;
|
||||
virtual bool RecvForceComposite() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool RecvNotifyRegionInvalidated(const nsIntRegion& aRegion) MOZ_OVERRIDE;
|
||||
virtual bool RecvStartFrameTimeRecording(const int32_t& aBufferSize, uint32_t* aOutStartIndex) MOZ_OVERRIDE;
|
||||
|
@ -102,6 +101,7 @@ public:
|
|||
const TargetConfig& aTargetConfig,
|
||||
bool aIsFirstPaint,
|
||||
bool aScheduleComposite) MOZ_OVERRIDE;
|
||||
virtual void ForceComposite(LayerTransactionParent* aLayerTree) MOZ_OVERRIDE;
|
||||
virtual AsyncCompositionManager* GetCompositionManager(LayerTransactionParent* aLayerTree) MOZ_OVERRIDE { return mCompositionManager; }
|
||||
/**
|
||||
* This forces the is-first-paint flag to true. This is intended to
|
||||
|
|
|
@ -648,6 +648,14 @@ LayerTransactionParent::RecvClearCachedResources()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
LayerTransactionParent::RecvForceComposite()
|
||||
{
|
||||
mShadowLayersManager->ForceComposite(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
PGrallocBufferParent*
|
||||
LayerTransactionParent::AllocPGrallocBufferParent(const IntSize& aSize,
|
||||
const uint32_t& aFormat,
|
||||
|
|
|
@ -90,6 +90,7 @@ protected:
|
|||
const bool& scheduleComposite) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool RecvClearCachedResources() MOZ_OVERRIDE;
|
||||
virtual bool RecvForceComposite() MOZ_OVERRIDE;
|
||||
virtual bool RecvGetOpacity(PLayerParent* aParent,
|
||||
float* aOpacity) MOZ_OVERRIDE;
|
||||
virtual bool RecvGetTransform(PLayerParent* aParent,
|
||||
|
|
|
@ -69,9 +69,6 @@ parent:
|
|||
// block until they are completed.
|
||||
sync FlushRendering();
|
||||
|
||||
// Schedule a composite if one isn't already scheduled.
|
||||
async ForceComposite();
|
||||
|
||||
sync StartFrameTimeRecording(int32_t bufferSize)
|
||||
returns (uint32_t startIndex);
|
||||
|
||||
|
|
|
@ -85,6 +85,9 @@ parent:
|
|||
// Drop any front buffers that might be retained on the compositor
|
||||
// side.
|
||||
async ClearCachedResources();
|
||||
|
||||
// Schedule a composite if one isn't already scheduled.
|
||||
async ForceComposite();
|
||||
|
||||
async __delete__();
|
||||
};
|
||||
|
|
|
@ -23,6 +23,8 @@ public:
|
|||
bool aScheduleComposite) = 0;
|
||||
|
||||
virtual AsyncCompositionManager* GetCompositionManager(LayerTransactionParent* aLayerTree) { return nullptr; }
|
||||
|
||||
virtual void ForceComposite(LayerTransactionParent* aLayerTree) { }
|
||||
};
|
||||
|
||||
} // layers
|
||||
|
|
Загрузка…
Ссылка в новой задаче