зеркало из https://github.com/mozilla/gecko-dev.git
Bug 745148, part 5: Pass the layer tree to ShadowLayersUpdate(). r=ajuma
This commit is contained in:
Родитель
493c9592b6
Коммит
56cbcae7e6
|
@ -525,16 +525,14 @@ CompositorParent::SyncViewportInfo(const nsIntRect& aDisplayPort,
|
|||
}
|
||||
|
||||
void
|
||||
CompositorParent::ShadowLayersUpdated(bool isFirstPaint)
|
||||
CompositorParent::ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
||||
bool isFirstPaint)
|
||||
{
|
||||
mIsFirstPaint = mIsFirstPaint || isFirstPaint;
|
||||
mLayersUpdated = true;
|
||||
const nsTArray<PLayersParent*>& shadowParents = ManagedPLayersParent();
|
||||
NS_ABORT_IF_FALSE(shadowParents.Length() <= 1,
|
||||
"can only support at most 1 ShadowLayersParent");
|
||||
if (shadowParents.Length()) {
|
||||
Layer* root = static_cast<ShadowLayersParent*>(shadowParents[0])->GetRoot();
|
||||
mLayerManager->SetRoot(root);
|
||||
Layer* root = aLayerTree->GetRoot();
|
||||
mLayerManager->SetRoot(root);
|
||||
if (root) {
|
||||
SetShadowProperties(root);
|
||||
}
|
||||
ScheduleComposition();
|
||||
|
|
|
@ -68,7 +68,8 @@ public:
|
|||
virtual bool RecvPause() MOZ_OVERRIDE;
|
||||
virtual bool RecvResume() MOZ_OVERRIDE;
|
||||
|
||||
virtual void ShadowLayersUpdated(bool isFirstPaint) MOZ_OVERRIDE;
|
||||
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
||||
bool isFirstPaint) MOZ_OVERRIDE;
|
||||
void Destroy();
|
||||
|
||||
LayerManager* GetLayerManager() { return mLayerManager; }
|
||||
|
|
|
@ -8,20 +8,16 @@
|
|||
#define mozilla_layers_ShadowLayersManager_h
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace layout {
|
||||
class RenderFrameParent;
|
||||
}
|
||||
|
||||
namespace layers {
|
||||
|
||||
class CompositorParent;
|
||||
class ShadowLayersParent;
|
||||
|
||||
class ShadowLayersManager
|
||||
{
|
||||
|
||||
public:
|
||||
virtual void ShadowLayersUpdated(bool isFirstPaint) = 0;
|
||||
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
||||
// FIXME nuke this
|
||||
bool isFirstPaint) = 0;
|
||||
};
|
||||
|
||||
} // layers
|
||||
|
|
|
@ -397,7 +397,7 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
|||
// other's buffer contents.
|
||||
ShadowLayerManager::PlatformSyncBeforeReplyUpdate();
|
||||
|
||||
mShadowLayersManager->ShadowLayersUpdated(isFirstPaint);
|
||||
mShadowLayersManager->ShadowLayersUpdated(this, isFirstPaint);
|
||||
|
||||
#ifdef COMPOSITOR_PERFORMANCE_WARNING
|
||||
int compositeTime = (int)(mozilla::TimeStamp::Now() - updateStart).ToMilliseconds();
|
||||
|
|
|
@ -489,7 +489,8 @@ RenderFrameParent::ContentViewScaleChanged(nsContentView* aView)
|
|||
}
|
||||
|
||||
void
|
||||
RenderFrameParent::ShadowLayersUpdated(bool isFirstPaint)
|
||||
RenderFrameParent::ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
||||
bool isFirstPaint)
|
||||
{
|
||||
mFrameLoader->SetCurrentRemoteFrame(this);
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ public:
|
|||
|
||||
void ContentViewScaleChanged(nsContentView* aView);
|
||||
|
||||
virtual void ShadowLayersUpdated(bool isFirstPaint) MOZ_OVERRIDE;
|
||||
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
||||
bool isFirstPaint) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
nsSubDocumentFrame* aFrame,
|
||||
|
|
Загрузка…
Ссылка в новой задаче