зеркало из https://github.com/mozilla/gecko-dev.git
Bug 590294, part 3: Keep ContainerLayer type info around in a few places. r=roc
This commit is contained in:
Родитель
6480591e23
Коммит
0c28df6c86
|
@ -325,7 +325,7 @@ ShadowLayersParent::RecvUpdate(const nsTArray<Edit>& cset,
|
|||
case Edit::TOpSetRoot: {
|
||||
MOZ_LAYERS_LOG(("[ParentSide] SetRoot"));
|
||||
|
||||
mRoot = AsShadowLayer(edit.get_OpSetRoot())->AsLayer();
|
||||
mRoot = AsShadowLayer(edit.get_OpSetRoot())->AsContainer();
|
||||
break;
|
||||
}
|
||||
case Edit::TOpInsertAfter: {
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
|
||||
ShadowLayerManager* layer_manager() const { return mLayerManager; }
|
||||
|
||||
Layer* GetRoot() const { return mRoot; }
|
||||
ContainerLayer* GetRoot() const { return mRoot; }
|
||||
|
||||
protected:
|
||||
NS_OVERRIDE virtual bool RecvUpdate(const EditArray& cset,
|
||||
|
@ -81,7 +81,7 @@ private:
|
|||
nsRefPtr<ShadowLayerManager> mLayerManager;
|
||||
// Hold the root because it might be grafted under various
|
||||
// containers in the "real" layer tree
|
||||
nsRefPtr<Layer> mRoot;
|
||||
nsRefPtr<ContainerLayer> mRoot;
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
|
|
|
@ -1320,7 +1320,7 @@ SetHasContainerLayer(nsIFrame* aFrame)
|
|||
}
|
||||
}
|
||||
|
||||
already_AddRefed<Layer>
|
||||
already_AddRefed<ContainerLayer>
|
||||
FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
nsIFrame* aContainerFrame,
|
||||
|
|
|
@ -90,6 +90,7 @@ enum LayerState {
|
|||
*/
|
||||
class FrameLayerBuilder {
|
||||
public:
|
||||
typedef layers::ContainerLayer ContainerLayer;
|
||||
typedef layers::Layer Layer;
|
||||
typedef layers::ThebesLayer ThebesLayer;
|
||||
typedef layers::LayerManager LayerManager;
|
||||
|
@ -138,11 +139,12 @@ public:
|
|||
* caller's responsibility to add any clip rect and set the visible
|
||||
* region.
|
||||
*/
|
||||
already_AddRefed<Layer> BuildContainerLayerFor(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
nsIFrame* aContainerFrame,
|
||||
nsDisplayItem* aContainerItem,
|
||||
const nsDisplayList& aChildren);
|
||||
already_AddRefed<ContainerLayer>
|
||||
BuildContainerLayerFor(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
nsIFrame* aContainerFrame,
|
||||
nsDisplayItem* aContainerItem,
|
||||
const nsDisplayList& aChildren);
|
||||
|
||||
/**
|
||||
* Get a retained layer for a display item that needs to create its own
|
||||
|
|
|
@ -403,7 +403,7 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
|
|||
layerManager->BeginTransaction();
|
||||
}
|
||||
|
||||
nsRefPtr<Layer> root = aBuilder->LayerBuilder()->
|
||||
nsRefPtr<ContainerLayer> root = aBuilder->LayerBuilder()->
|
||||
BuildContainerLayerFor(aBuilder, layerManager, aForFrame, nsnull, *this);
|
||||
if (!root)
|
||||
return;
|
||||
|
|
|
@ -173,7 +173,7 @@ RenderFrameParent::BuildLayer(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
Layer* containerRoot = mContainer ? RootOf(mContainer) : nsnull;
|
||||
Layer* shadowRoot = GetRootLayer();
|
||||
ContainerLayer* shadowRoot = GetRootLayer();
|
||||
NS_ABORT_IF_FALSE(!shadowRoot || shadowRoot->Manager() == aManager,
|
||||
"retaining manager changed out from under us ... HELP!");
|
||||
|
||||
|
@ -263,7 +263,7 @@ RenderFrameParent::GetShadowLayers() const
|
|||
static_cast<ShadowLayersParent*>(shadowParents[0]) : nsnull;
|
||||
}
|
||||
|
||||
Layer*
|
||||
ContainerLayer*
|
||||
RenderFrameParent::GetRootLayer() const
|
||||
{
|
||||
ShadowLayersParent* shadowLayers = GetShadowLayers();
|
||||
|
|
|
@ -83,7 +83,7 @@ protected:
|
|||
private:
|
||||
LayerManager* GetLayerManager() const;
|
||||
ShadowLayersParent* GetShadowLayers() const;
|
||||
Layer* GetRootLayer() const;
|
||||
ContainerLayer* GetRootLayer() const;
|
||||
|
||||
nsRefPtr<nsFrameLoader> mFrameLoader;
|
||||
nsRefPtr<ContainerLayer> mContainer;
|
||||
|
|
Загрузка…
Ссылка в новой задаче