From 789fd7e1095f0236788db76ffe7c6d03581eb661 Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Mon, 9 Dec 2013 14:41:00 +1300 Subject: [PATCH] Bug 946958 part 5. Misc tidy ups. r=mattwoodrow --- gfx/layers/composite/LayerManagerComposite.cpp | 4 ++-- gfx/layers/composite/LayerManagerComposite.h | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index f531f7905c46..e16fbb2d6a21 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -302,7 +302,7 @@ LayerManagerComposite::RootLayer() const return nullptr; } - return static_cast(mRoot->ImplData()); + return ToLayerComposite(mRoot); } static uint16_t sFrameCount = 0; @@ -718,7 +718,7 @@ LayerManagerComposite::AutoAddMaskEffect::AutoAddMaskEffect(Layer* aMaskLayer, return; } - mCompositable = static_cast(aMaskLayer->ImplData())->GetCompositableHost(); + mCompositable = ToLayerComposite(aMaskLayer)->GetCompositableHost(); if (!mCompositable) { NS_WARNING("Mask layer with no compositable host"); return; diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index 5bf369302cd6..26c3a1b94906 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -142,7 +142,7 @@ public: virtual LayersBackend GetBackendType() MOZ_OVERRIDE { - return LAYERS_NONE; + MOZ_CRASH("Shouldn't be called for composited layer manager"); } virtual void GetBackendName(nsAString& name) MOZ_OVERRIDE { @@ -152,7 +152,6 @@ public: virtual already_AddRefed CreateOptimalMaskSurface(const gfxIntSize &aSize) MOZ_OVERRIDE; - virtual const char* Name() const MOZ_OVERRIDE { return ""; } enum WorldTransforPolicy { @@ -189,7 +188,7 @@ public: * layermanager. */ virtual TemporaryRef - CreateDrawTarget(const mozilla::gfx::IntSize &aSize, + CreateDrawTarget(const mozilla::gfx::IntSize& aSize, mozilla::gfx::SurfaceFormat aFormat) MOZ_OVERRIDE; /** @@ -235,7 +234,7 @@ private: nsIntRect mRenderBounds; /** Current root layer. */ - LayerComposite *RootLayer() const; + LayerComposite* RootLayer() const; /** * Recursive helper method for use by ComputeRenderIntegrity. Subtracts