author | Ed Morley <emorley@mozilla.com> |
Wed, 06 Aug 2014 17:04:01 +0100 | |
changeset 198200 | 931943302ba5589492f4009d8a405cc5970ea8c2 |
parent 198199 | 9545e672983b8a18de398a730fde93f76eb237d2 |
child 198201 | 8b65ed5b350703c6c79c289bdc947d70991ce894 |
push id | 27264 |
push user | nigelbabu@gmail.com |
push date | Thu, 07 Aug 2014 03:31:37 +0000 |
treeherder | mozilla-central@afcb3af79d09 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1048916 |
milestone | 34.0a1 |
backs out | 9545e672983b8a18de398a730fde93f76eb237d2 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/layers/LayerTreeInvalidation.cpp +++ b/gfx/layers/LayerTreeInvalidation.cpp @@ -26,17 +26,17 @@ #include "nsTArray.h" // for nsAutoTArray, nsTArray_Impl using namespace mozilla::gfx; namespace mozilla { namespace layers { struct LayerPropertiesBase; -UniquePtr<LayerPropertiesBase> CloneLayerTreePropertiesInternal(Layer* aRoot); +LayerPropertiesBase* CloneLayerTreePropertiesInternal(Layer* aRoot); static nsIntRect TransformRect(const nsIntRect& aRect, const Matrix4x4& aTransform) { if (aRect.IsEmpty()) { return nsIntRect(); } @@ -194,17 +194,17 @@ struct LayerPropertiesBase : public Laye virtual nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback, bool& aGeometryChanged) { return nsIntRect(); } nsRefPtr<Layer> mLayer; - UniquePtr<LayerPropertiesBase> mMaskLayer; + nsAutoPtr<LayerPropertiesBase> mMaskLayer; nsIntRegion mVisibleRegion; nsIntRegion mInvalidRegion; Matrix4x4 mTransform; float mPostXScale; float mPostYScale; float mOpacity; nsIntRect mClipRect; bool mUseClipRect; @@ -213,17 +213,17 @@ struct LayerPropertiesBase : public Laye struct ContainerLayerProperties : public LayerPropertiesBase { ContainerLayerProperties(ContainerLayer* aLayer) : LayerPropertiesBase(aLayer) , mPreXScale(aLayer->GetPreXScale()) , mPreYScale(aLayer->GetPreYScale()) { for (Layer* child = aLayer->GetFirstChild(); child; child = child->GetNextSibling()) { - mChildren.AppendElement(Move(CloneLayerTreePropertiesInternal(child))); + mChildren.AppendElement(CloneLayerTreePropertiesInternal(child)); } } virtual nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback, bool& aGeometryChanged) { ContainerLayer* container = mLayer->AsContainerLayer(); nsIntRegion result; @@ -310,17 +310,17 @@ struct ContainerLayerProperties : public aCallback(container, result); } result.Transform(gfx::To3DMatrix(mLayer->GetTransform())); return result; } // The old list of children: - nsAutoTArray<UniquePtr<LayerPropertiesBase>,1> mChildren; + nsAutoTArray<nsAutoPtr<LayerPropertiesBase>,1> mChildren; float mPreXScale; float mPreYScale; }; struct ColorLayerProperties : public LayerPropertiesBase { ColorLayerProperties(ColorLayer *aLayer) : LayerPropertiesBase(aLayer) @@ -378,39 +378,39 @@ struct ImageLayerProperties : public Lay } nsRefPtr<ImageContainer> mContainer; GraphicsFilter mFilter; gfx::IntSize mScaleToSize; ScaleMode mScaleMode; }; -UniquePtr<LayerPropertiesBase> +LayerPropertiesBase* CloneLayerTreePropertiesInternal(Layer* aRoot) { if (!aRoot) { - return MakeUnique<LayerPropertiesBase>(); + return new LayerPropertiesBase(); } switch (aRoot->GetType()) { case Layer::TYPE_CONTAINER: case Layer::TYPE_REF: - return MakeUnique<ContainerLayerProperties>(aRoot->AsContainerLayer()); + return new ContainerLayerProperties(aRoot->AsContainerLayer()); case Layer::TYPE_COLOR: - return MakeUnique<ColorLayerProperties>(static_cast<ColorLayer*>(aRoot)); + return new ColorLayerProperties(static_cast<ColorLayer*>(aRoot)); case Layer::TYPE_IMAGE: - return MakeUnique<ImageLayerProperties>(static_cast<ImageLayer*>(aRoot)); + return new ImageLayerProperties(static_cast<ImageLayer*>(aRoot)); default: - return MakeUnique<LayerPropertiesBase>(aRoot); + return new LayerPropertiesBase(aRoot); } return nullptr; } -/* static */ UniquePtr<LayerProperties> +/* static */ LayerProperties* LayerProperties::CloneFrom(Layer* aRoot) { return CloneLayerTreePropertiesInternal(aRoot); } /* static */ void LayerProperties::ClearInvalidations(Layer *aLayer) {
--- a/gfx/layers/LayerTreeInvalidation.h +++ b/gfx/layers/LayerTreeInvalidation.h @@ -2,17 +2,16 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef GFX_LAYER_TREE_INVALIDATION_H #define GFX_LAYER_TREE_INVALIDATION_H #include "nsRegion.h" // for nsIntRegion -#include "mozilla/UniquePtr.h" // for UniquePtr class nsPresContext; struct nsIntPoint; namespace mozilla { namespace layers { class Layer; @@ -38,17 +37,17 @@ struct LayerProperties /** * Copies the current layer tree properties into * a new LayerProperties object. * * @param Layer tree to copy, or nullptr if we have no * initial layer tree. */ - static UniquePtr<LayerProperties> CloneFrom(Layer* aRoot); + static LayerProperties* CloneFrom(Layer* aRoot); /** * Clear all invalidation status from this layer tree. */ static void ClearInvalidations(Layer* aRoot); /** * Compares a set of existing layer tree properties to the current layer
--- a/gfx/layers/composite/ContentHost.h +++ b/gfx/layers/composite/ContentHost.h @@ -18,17 +18,17 @@ #include "mozilla/gfx/Rect.h" // for Rect #include "mozilla/gfx/Types.h" // for Filter #include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc #include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator #include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor #include "mozilla/layers/LayersTypes.h" // for etc #include "mozilla/layers/TextureHost.h" // for TextureHost #include "mozilla/mozalloc.h" // for operator delete -#include "mozilla/UniquePtr.h" // for UniquePtr +#include "nsAutoPtr.h" // for nsAutoPtr #include "nsCOMPtr.h" // for already_AddRefed #include "nsDebug.h" // for NS_RUNTIMEABORT #include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc #include "nsPoint.h" // for nsIntPoint #include "nsRect.h" // for nsIntRect #include "nsRegion.h" // for nsIntRegion #include "nsTArray.h" // for nsTArray #include "nscore.h" // for nsACString @@ -370,17 +370,17 @@ private: RefPtr<ISurfaceAllocator> mDeAllocator; TextureIdentifier mTextureId; SurfaceDescriptor mDescriptor; nsIntRegion mUpdated; nsIntRect mBufferRect; nsIntPoint mBufferRotation; }; - nsTArray<UniquePtr<Request> > mUpdateList; + nsTArray<nsAutoPtr<Request> > mUpdateList; // Specific to OGL to avoid exposing methods on TextureSource that only // have one implementation. RefPtr<TextureImageTextureSourceOGL> mSource; RefPtr<TextureImageTextureSourceOGL> mSourceOnWhite; RefPtr<ISurfaceAllocator> mDeAllocator; bool mLocked;
--- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -335,17 +335,17 @@ void LayerManagerComposite::RenderDebugOverlay(const Rect& aBounds) { bool drawFps = gfxPrefs::LayersDrawFPS(); bool drawFrameCounter = gfxPrefs::DrawFrameCounter(); bool drawFrameColorBars = gfxPrefs::CompositorDrawColorBars(); if (drawFps) { if (!mFPS) { - mFPS = MakeUnique<FPSState>(); + mFPS = new FPSState(); } float fillRatio = mCompositor->GetFillRatio(); mFPS->DrawFPS(TimeStamp::Now(), drawFrameColorBars ? 10 : 0, 0, unsigned(fillRatio), mCompositor); } else { mFPS = nullptr; }
--- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -14,17 +14,16 @@ #include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef #include "mozilla/gfx/2D.h" #include "mozilla/gfx/Point.h" // for IntSize #include "mozilla/gfx/Rect.h" // for Rect #include "mozilla/gfx/Types.h" // for SurfaceFormat #include "mozilla/layers/CompositorTypes.h" #include "mozilla/layers/LayersTypes.h" // for LayersBackend, etc #include "mozilla/RefPtr.h" -#include "mozilla/UniquePtr.h" #include "nsAString.h" #include "nsAutoPtr.h" // for nsRefPtr #include "nsCOMPtr.h" // for already_AddRefed #include "nsDebug.h" // for NS_ASSERTION #include "nsISupportsImpl.h" // for Layer::AddRef, etc #include "nsRect.h" // for nsIntRect #include "nsRegion.h" // for nsIntRegion #include "nscore.h" // for nsAString, etc @@ -263,27 +262,27 @@ private: /** * Render debug overlays such as the FPS/FrameCounter above the frame. */ void RenderDebugOverlay(const gfx::Rect& aBounds); void WorldTransformRect(nsIntRect& aRect); RefPtr<Compositor> mCompositor; - UniquePtr<LayerProperties> mClonedLayerTreeProperties; + nsAutoPtr<LayerProperties> mClonedLayerTreeProperties; /** * Context target, nullptr when drawing directly to our swap chain. */ RefPtr<gfx::DrawTarget> mTarget; nsIntRect mTargetBounds; gfx::Matrix mWorldMatrix; nsIntRegion mInvalidRegion; - UniquePtr<FPSState> mFPS; + nsAutoPtr<FPSState> mFPS; bool mInTransaction; bool mIsCompositorReady; bool mDebugOverlayWantsNextFrame; RefPtr<TextRenderer> mTextRenderer; bool mGeometryChanged; };
--- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -3167,17 +3167,17 @@ FrameLayerBuilder::AddThebesDisplayItem( FrameLayerBuilder* layerBuilder = new FrameLayerBuilder(); layerBuilder->Init(mDisplayListBuilder, tempManager, aLayerData); tempManager->BeginTransaction(); if (mRetainingManager) { layerBuilder->DidBeginRetainedLayerTransaction(tempManager); } - UniquePtr<LayerProperties> props(LayerProperties::CloneFrom(tempManager->GetRoot())); + nsAutoPtr<LayerProperties> props(LayerProperties::CloneFrom(tempManager->GetRoot())); nsRefPtr<Layer> tmpLayer = aItem->BuildLayer(mDisplayListBuilder, tempManager, ContainerLayerParameters()); // We have no easy way of detecting if this transaction will ever actually get finished. // For now, I've just silenced the warning with nested transactions in BasicLayers.cpp if (!tmpLayer) { tempManager->EndTransaction(nullptr, nullptr); tempManager->SetUserData(&gLayerManagerLayerBuilder, nullptr); return;
--- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -45,17 +45,16 @@ #include "nsViewManager.h" #include "ImageLayers.h" #include "ImageContainer.h" #include "nsCanvasFrame.h" #include "StickyScrollContainer.h" #include "mozilla/EventStates.h" #include "mozilla/LookAndFeel.h" #include "mozilla/Preferences.h" -#include "mozilla/UniquePtr.h" #include "ActiveLayerTracker.h" #include "nsContentUtils.h" #include "nsPrintfCString.h" #include "UnitTransforms.h" #include "LayersLogging.h" #include <stdint.h> #include <algorithm> @@ -1245,20 +1244,19 @@ void nsDisplayList::PaintForFrame(nsDisp nsIPresShell* presShell = presContext->GetPresShell(); NotifySubDocInvalidationFunc computeInvalidFunc = presContext->MayHavePaintEventListenerInSubDocument() ? nsPresContext::NotifySubDocInvalidation : 0; bool computeInvalidRect = (computeInvalidFunc || (!layerManager->IsCompositingCheap() && layerManager->NeedsWidgetInvalidation())) && widgetTransaction; - UniquePtr<LayerProperties> props; - if (computeInvalidRect) { - props = Move(LayerProperties::CloneFrom(layerManager->GetRoot())); - } + nsAutoPtr<LayerProperties> props(computeInvalidRect ? + LayerProperties::CloneFrom(layerManager->GetRoot()) : + nullptr); ContainerLayerParameters containerParameters (presShell->GetXResolution(), presShell->GetYResolution()); nsRefPtr<ContainerLayer> root = layerBuilder-> BuildContainerLayerFor(aBuilder, layerManager, aForFrame, nullptr, this, containerParameters, nullptr); nsIDocument* document = nullptr;
--- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -30,17 +30,16 @@ #include "mozilla/EventStates.h" #include "mozilla/IMEStateManager.h" #include "mozilla/MemoryReporting.h" #include "mozilla/dom/TabChild.h" #include "mozilla/Likely.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" #include "mozilla/TouchEvents.h" -#include "mozilla/UniquePtr.h" #include <algorithm> #ifdef XP_WIN #include "winuser.h" #endif #include "nsPresShell.h" #include "nsPresContext.h" @@ -6180,20 +6179,19 @@ PresShell::Paint(nsView* aViewToP if (!(frame->GetStateBits() & NS_FRAME_UPDATE_LAYER_TREE) && !mNextPaintCompressed) { NotifySubDocInvalidationFunc computeInvalidFunc = presContext->MayHavePaintEventListenerInSubDocument() ? nsPresContext::NotifySubDocInvalidation : 0; bool computeInvalidRect = computeInvalidFunc || (layerManager->GetBackendType() == LayersBackend::LAYERS_BASIC); - UniquePtr<LayerProperties> props; - if (computeInvalidRect) { - props = Move(LayerProperties::CloneFrom(layerManager->GetRoot())); - } + nsAutoPtr<LayerProperties> props(computeInvalidRect ? + LayerProperties::CloneFrom(layerManager->GetRoot()) : + nullptr); MaybeSetupTransactionIdAllocator(layerManager, aViewToPaint); if (layerManager->EndEmptyTransaction((aFlags & PAINT_COMPOSITE) ? LayerManager::END_DEFAULT : LayerManager::END_NO_COMPOSITE)) { nsIntRegion invalid; if (props) { invalid = props->ComputeDifferences(layerManager->GetRoot(), computeInvalidFunc);