Backed out changeset 3a61a6eb04d6 (bug 1055821) for build failures

This commit is contained in:
Ed Morley 2014-08-22 14:12:01 +01:00
parent e00fbc2dde
commit eb4526b598
3 changed files with 1 additions and 68 deletions

View File

@ -1320,13 +1320,6 @@ Layer::Dump(std::stringstream& aStream, const char* aPrefix, bool aDumpHtml)
mask->Dump(aStream, pfx.get(), aDumpHtml);
}
#ifdef MOZ_DUMP_PAINTING
for (size_t i = 0; i < mExtraDumpInfo.Length(); i++) {
const nsCString& str = mExtraDumpInfo[i];
aStream << aPrefix << " Info:\n" << str.get();
}
#endif
if (Layer* kid = GetFirstChild()) {
nsAutoCString pfx(aPrefix);
pfx += " ";

View File

@ -1504,26 +1504,6 @@ public:
RenderTargetRect TransformRectToRenderTarget(const LayerIntRect& aRect);
/**
* Add debugging information to the layer dump.
*/
void AddExtraDumpInfo(const nsACString& aStr)
{
#ifdef MOZ_DUMP_PAINTING
mExtraDumpInfo.AppendElement(aStr);
#endif
}
/**
* Clear debugging information. Useful for recycling.
*/
void ClearExtraDumpInfo()
{
#ifdef MOZ_DUMP_PAINTING
mExtraDumpInfo.Clear();
#endif
}
protected:
Layer(LayerManager* aManager, void* aImplData);
@ -1626,9 +1606,6 @@ protected:
// This is empty unless this is a scrollable ContainerLayer and the
// apz.printtree pref is turned on.
std::string mContentDescription;
#ifdef MOZ_DUMP_PAINTING
nsTArray<nsCString> mExtraDumpInfo;
#endif
};
/**

View File

@ -370,20 +370,6 @@ public:
return mFixedPosFrameForLayerData != nullptr;
}
#ifdef MOZ_DUMP_PAINTING
/**
* Keep track of important decisions for debugging.
*/
nsAutoCString mLog;
#define FLB_LOG_THEBES_DECISION(tld, ...) \
tld->mLog.AppendPrintf("\t\t\t\t"); \
tld->mLog.AppendPrintf(__VA_ARGS__);
#else
#define FLB_LOG_THEBES_DECISION(...)
#endif
/**
* The region of visible content in the layer, relative to the
* container layer (which is at the snapped top-left of the display
@ -515,7 +501,6 @@ private:
* as infinite, and all display items should be considered 'above' this layer.
*/
bool mAllDrawingAbove;
};
struct NewLayerEntry {
@ -1470,7 +1455,6 @@ ContainerState::CreateOrRecycleColorLayer(ThebesLayer *aThebes)
nsRefPtr<ColorLayer> layer = data->mColorLayer;
if (layer) {
layer->SetMaskLayer(nullptr);
layer->ClearExtraDumpInfo();
} else {
// Create a new layer
layer = mManager->CreateColorLayer();
@ -1494,7 +1478,6 @@ ContainerState::CreateOrRecycleImageLayer(ThebesLayer *aThebes)
nsRefPtr<ImageLayer> layer = data->mImageLayer;
if (layer) {
layer->SetMaskLayer(nullptr);
layer->ClearExtraDumpInfo();
} else {
// Create a new layer
layer = mManager->CreateImageLayer();
@ -1516,7 +1499,6 @@ ContainerState::CreateOrRecycleMaskImageLayerFor(Layer* aLayer)
nsRefPtr<ImageLayer> result = mRecycledMaskImageLayers.Get(aLayer);
if (result) {
mRecycledMaskImageLayers.Remove(aLayer);
aLayer->ClearExtraDumpInfo();
// XXX if we use clip on mask layers, null it out here
} else {
// Create a new layer
@ -1619,7 +1601,6 @@ ContainerState::CreateOrRecycleThebesLayer(const nsIFrame* aAnimatedGeometryRoot
// Clear clip rect and mask layer so we don't accidentally stay clipped.
// We will reapply any necessary clipping.
layer->SetMaskLayer(nullptr);
layer->ClearExtraDumpInfo();
data = static_cast<ThebesDisplayItemLayerUserData*>
(layer->GetUserData(&gThebesDisplayItemLayerUserData));
@ -2067,12 +2048,6 @@ ContainerState::PopThebesLayerData()
NewLayerEntry* newLayerEntry = &mNewChildLayers[data->mNewChildLayersIndex];
nsRefPtr<Layer> layer;
nsRefPtr<ImageContainer> imageContainer = data->CanOptimizeImageLayer(mBuilder);
FLB_LOG_THEBES_DECISION(data, "Selecting layer for tld=%p\n", data);
FLB_LOG_THEBES_DECISION(data, " Solid=%i, hasImage=%i, canOptimizeAwayThebes=%i\n",
data->mIsSolidColorInVisibleRegion, !!imageContainer,
CanOptimizeAwayThebesLayer(data, mLayerBuilder));
if ((data->mIsSolidColorInVisibleRegion || imageContainer) &&
CanOptimizeAwayThebesLayer(data, mLayerBuilder)) {
NS_ASSERTION(!(data->mIsSolidColorInVisibleRegion && imageContainer),
@ -2093,7 +2068,6 @@ ContainerState::PopThebesLayerData()
layer = imageLayer;
mLayerBuilder->StoreOptimizedLayerForFrame(data->mImage,
imageLayer);
FLB_LOG_THEBES_DECISION(data, " Selected image layer=%p\n", layer.get());
} else {
nsRefPtr<ColorLayer> colorLayer = CreateOrRecycleColorLayer(data->mLayer);
colorLayer->SetColor(data->mSolidColor);
@ -2107,7 +2081,6 @@ ContainerState::PopThebesLayerData()
colorLayer->SetBounds(visibleRect);
layer = colorLayer;
FLB_LOG_THEBES_DECISION(data, " Selected color layer=%p\n", layer.get());
}
NS_ASSERTION(FindIndexOfLayerIn(mNewChildLayers, layer) < 0,
@ -2132,7 +2105,6 @@ ContainerState::PopThebesLayerData()
layer = data->mLayer;
imageContainer = nullptr;
layer->SetClipRect(nullptr);
FLB_LOG_THEBES_DECISION(data, " Selected thebes layer=%p\n", layer.get());
}
if (mLayerBuilder->IsBuildingRetainedLayers()) {
@ -2149,8 +2121,6 @@ ContainerState::PopThebesLayerData()
SetOuterVisibleRegionForLayer(layer, data->mVisibleRegion);
}
layer->AddExtraDumpInfo(nsCString(data->mLog));
nsIntRegion transparentRegion;
transparentRegion.Sub(data->mVisibleRegion, data->mOpaqueRegion);
bool isOpaque = transparentRegion.IsEmpty();
@ -2305,8 +2275,6 @@ ThebesLayerData::Accumulate(ContainerState* aState,
const nsIntRect& aDrawRect,
const DisplayItemClip& aClip)
{
FLB_LOG_THEBES_DECISION(this, "Accumulating dp=%s(%p), f=%p against tld=%p\n", aItem->Name(), aItem, aItem->Frame(), this);
if (aState->mBuilder->NeedToForceTransparentSurfaceForItem(aItem)) {
mForceTransparentSurface = true;
}
@ -2323,9 +2291,7 @@ ThebesLayerData::Accumulate(ContainerState* aState,
if (mVisibleRegion.IsEmpty() &&
aItem->SupportsOptimizingToImage()) {
mImage = static_cast<nsDisplayImageContainer*>(aItem);
FLB_LOG_THEBES_DECISION(this, " Tracking image\n");
} else if (mImage) {
FLB_LOG_THEBES_DECISION(this, " No longer tracking image\n");
} else {
mImage = nullptr;
}
bool clipMatches = mItemClip == aClip;
@ -2360,7 +2326,6 @@ ThebesLayerData::Accumulate(ContainerState* aState,
nsRect bounds = aItem->GetBounds(aState->mBuilder, &snap);
if (!aState->ScaleToInsidePixels(bounds, snap).Contains(aVisibleRect)) {
isUniform = false;
FLB_LOG_THEBES_DECISION(this, " Display item does not cover the visible rect\n");
}
}
if (isUniform) {
@ -2374,11 +2339,9 @@ ThebesLayerData::Accumulate(ContainerState* aState,
// we can just blend the colors together
mSolidColor = NS_ComposeColors(mSolidColor, uniformColor);
} else {
FLB_LOG_THEBES_DECISION(this, " Layer not a solid color: Can't blend colors togethers\n");
mIsSolidColorInVisibleRegion = false;
}
} else {
FLB_LOG_THEBES_DECISION(this, " Layer is not a solid color: Display item is not uniform over the visible bound\n");
mIsSolidColorInVisibleRegion = false;
}