Backed out changeset 9545e672983b (bug 1048916) for build failures; CLOSED TREE

This commit is contained in:
Ed Morley 2014-08-06 17:04:01 +01:00
Родитель 454be7396a
Коммит 5a4133b7b6
8 изменённых файлов: 24 добавлений и 30 удалений

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

@ -31,7 +31,7 @@ namespace mozilla {
namespace layers {
struct LayerPropertiesBase;
UniquePtr<LayerPropertiesBase> CloneLayerTreePropertiesInternal(Layer* aRoot);
LayerPropertiesBase* CloneLayerTreePropertiesInternal(Layer* aRoot);
static nsIntRect
TransformRect(const nsIntRect& aRect, const Matrix4x4& aTransform)
@ -199,7 +199,7 @@ struct LayerPropertiesBase : public LayerProperties
}
nsRefPtr<Layer> mLayer;
UniquePtr<LayerPropertiesBase> mMaskLayer;
nsAutoPtr<LayerPropertiesBase> mMaskLayer;
nsIntRegion mVisibleRegion;
nsIntRegion mInvalidRegion;
Matrix4x4 mTransform;
@ -218,7 +218,7 @@ struct ContainerLayerProperties : public LayerPropertiesBase
, mPreYScale(aLayer->GetPreYScale())
{
for (Layer* child = aLayer->GetFirstChild(); child; child = child->GetNextSibling()) {
mChildren.AppendElement(Move(CloneLayerTreePropertiesInternal(child)));
mChildren.AppendElement(CloneLayerTreePropertiesInternal(child));
}
}
@ -315,7 +315,7 @@ struct ContainerLayerProperties : public LayerPropertiesBase
}
// The old list of children:
nsAutoTArray<UniquePtr<LayerPropertiesBase>,1> mChildren;
nsAutoTArray<nsAutoPtr<LayerPropertiesBase>,1> mChildren;
float mPreXScale;
float mPreYScale;
};
@ -383,29 +383,29 @@ struct ImageLayerProperties : public LayerPropertiesBase
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);

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

@ -7,7 +7,6 @@
#define GFX_LAYER_TREE_INVALIDATION_H
#include "nsRegion.h" // for nsIntRegion
#include "mozilla/UniquePtr.h" // for UniquePtr
class nsPresContext;
struct nsIntPoint;
@ -43,7 +42,7 @@ struct LayerProperties
* @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.

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

@ -23,7 +23,7 @@
#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
@ -375,7 +375,7 @@ private:
nsIntPoint mBufferRotation;
};
nsTArray<UniquePtr<Request> > mUpdateList;
nsTArray<nsAutoPtr<Request> > mUpdateList;
// Specific to OGL to avoid exposing methods on TextureSource that only
// have one implementation.

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

@ -340,7 +340,7 @@ LayerManagerComposite::RenderDebugOverlay(const Rect& aBounds)
if (drawFps) {
if (!mFPS) {
mFPS = MakeUnique<FPSState>();
mFPS = new FPSState();
}
float fillRatio = mCompositor->GetFillRatio();

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

@ -19,7 +19,6 @@
#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
@ -268,7 +267,7 @@ private:
void WorldTransformRect(nsIntRect& aRect);
RefPtr<Compositor> mCompositor;
UniquePtr<LayerProperties> mClonedLayerTreeProperties;
nsAutoPtr<LayerProperties> mClonedLayerTreeProperties;
/**
* Context target, nullptr when drawing directly to our swap chain.
@ -278,7 +277,7 @@ private:
gfx::Matrix mWorldMatrix;
nsIntRegion mInvalidRegion;
UniquePtr<FPSState> mFPS;
nsAutoPtr<FPSState> mFPS;
bool mInTransaction;
bool mIsCompositorReady;

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

@ -3172,7 +3172,7 @@ FrameLayerBuilder::AddThebesDisplayItem(ThebesLayerData* aLayerData,
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.

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

@ -50,7 +50,6 @@
#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"
@ -1250,10 +1249,9 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
(!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());

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

@ -35,7 +35,6 @@
#include "mozilla/MouseEvents.h"
#include "mozilla/TextEvents.h"
#include "mozilla/TouchEvents.h"
#include "mozilla/UniquePtr.h"
#include <algorithm>
#ifdef XP_WIN
@ -6185,10 +6184,9 @@ PresShell::Paint(nsView* aViewToPaint,
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);