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: { case Edit::TOpSetRoot: {
MOZ_LAYERS_LOG(("[ParentSide] SetRoot")); MOZ_LAYERS_LOG(("[ParentSide] SetRoot"));
mRoot = AsLayerComposite(edit.get_OpSetRoot())->AsContainer(); mRoot = AsLayerComposite(edit.get_OpSetRoot())->AsLayer();
break; break;
} }
case Edit::TOpInsertAfter: { case Edit::TOpInsertAfter: {

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

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

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

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

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

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