Bug 888622 - Root layer isn't always ContainerLayer, remove incorrect cast. r=kats

--HG--
extra : rebase_source : c3948e30b6fd05c896e1a773e520b8eecfdd05af
This commit is contained in:
Benoit Girard 2013-07-02 00:17:23 -04:00
Родитель 075841615e
Коммит 9270c725b9
4 изменённых файлов: 8 добавлений и 8 удалений

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

@ -343,7 +343,7 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
case Edit::TOpSetRoot: {
MOZ_LAYERS_LOG(("[ParentSide] SetRoot"));
mRoot = AsLayerComposite(edit.get_OpSetRoot())->AsContainer();
mRoot = AsLayerComposite(edit.get_OpSetRoot())->AsLayer();
break;
}
case Edit::TOpInsertAfter: {

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

@ -44,7 +44,7 @@ public:
LayerManagerComposite* layer_manager() const { return mLayerManager; }
uint64_t GetId() const { return mId; }
ContainerLayer* GetRoot() const { return mRoot; }
Layer* GetRoot() const { return mRoot; }
// ISurfaceAllocator
virtual bool AllocShmem(size_t aSize,
@ -101,7 +101,7 @@ private:
ShadowLayersManager* mShadowLayersManager;
// Hold the root because it might be grafted under various
// containers in the "real" layer tree
nsRefPtr<ContainerLayer> mRoot;
nsRefPtr<Layer> mRoot;
// When this is nonzero, it refers to a layer tree owned by the
// compositor thread. It is always true that
// mId != 0 => mRoot == null

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

@ -428,7 +428,7 @@ BuildViewMap(ViewMap& oldContentViews, ViewMap& newContentViews,
static void
BuildBackgroundPatternFor(ContainerLayer* aContainer,
ContainerLayer* aShadowRoot,
Layer* aShadowRoot,
const ViewConfig& aConfig,
const gfxRGBA& aColor,
LayerManager* aManager,
@ -733,7 +733,7 @@ RenderFrameParent::BuildLayer(nsDisplayListBuilder* aBuilder,
mContainer->SetInheritedScale(1.0f, 1.0f);
}
ContainerLayer* shadowRoot = GetRootLayer();
Layer* shadowRoot = GetRootLayer();
if (!shadowRoot) {
mContainer = nullptr;
return nullptr;
@ -930,7 +930,7 @@ RenderFrameParent::GetLayerTreeId() const
return mLayersId;
}
ContainerLayer*
Layer*
RenderFrameParent::GetRootLayer() const
{
LayerTransactionParent* shadowLayers = GetShadowLayers();
@ -951,7 +951,7 @@ RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsRect bounds = aFrame->EnsureInnerView()->GetBounds() + offset;
clipState.ClipContentDescendants(bounds);
ContainerLayer* container = GetRootLayer();
Layer* container = GetRootLayer();
if (aBuilder->IsForEventDelivery() && container) {
ViewTransform offset =
ViewTransform(GetContentRectLayerOffset(aFrame, aBuilder));

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

@ -122,7 +122,7 @@ private:
LayerTransactionParent* GetShadowLayers() const;
uint64_t GetLayerTreeId() const;
ContainerLayer* GetRootLayer() const;
Layer* GetRootLayer() const;
// When our child frame is pushing transactions directly to the
// compositor, this is the ID of its layer tree in the compositor's