Back out f4f5189b1d0c, 3b4f0606c547, b8a5a1ab8a5f, 5078933d6954, 7e0260c45de9 (bug 768440, bug 755084, bug 706179) because of reftest failures
This commit is contained in:
@@ -21,9 +21,6 @@
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "sampler.h"
|
||||
|
||||
#include "nsAnimationManager.h"
|
||||
#include "nsTransitionManager.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
@@ -631,7 +628,7 @@ FrameLayerBuilder::FlashPaint(gfxContext *aContext)
|
||||
|
||||
if (!sPaintFlashingPrefCached) {
|
||||
sPaintFlashingPrefCached = true;
|
||||
mozilla::Preferences::AddBoolVarCache(&sPaintFlashingEnabled,
|
||||
mozilla::Preferences::AddBoolVarCache(&sPaintFlashingEnabled,
|
||||
"nglayout.debug.paint_flashing");
|
||||
}
|
||||
|
||||
@@ -996,7 +993,7 @@ ContainerState::CreateOrRecycleMaskImageLayerFor(Layer* aLayer)
|
||||
result->SetUserData(&gMaskLayerUserData, new MaskLayerUserData());
|
||||
result->SetForceSingleTile(true);
|
||||
}
|
||||
|
||||
|
||||
return result.forget();
|
||||
}
|
||||
|
||||
@@ -1234,7 +1231,7 @@ ContainerState::ThebesLayerData::UpdateCommonClipCount(
|
||||
} else {
|
||||
// first item in the layer
|
||||
mCommonClipCount = aCurrentClip.mRoundedClipRects.Length();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<ImageContainer>
|
||||
@@ -1256,7 +1253,7 @@ ContainerState::PopThebesLayerData()
|
||||
ThebesLayerData* data = mThebesLayerDataStack[lastIndex];
|
||||
|
||||
nsRefPtr<Layer> layer;
|
||||
nsRefPtr<ImageContainer> imageContainer = data->CanOptimizeImageLayer();
|
||||
nsRefPtr<ImageContainer> imageContainer = data->CanOptimizeImageLayer();
|
||||
|
||||
if ((data->mIsSolidColorInVisibleRegion || imageContainer) &&
|
||||
data->mLayer->GetValidRegion().IsEmpty()) {
|
||||
@@ -1282,7 +1279,7 @@ ContainerState::PopThebesLayerData()
|
||||
|
||||
// Copy transform
|
||||
colorLayer->SetTransform(data->mLayer->GetTransform());
|
||||
|
||||
|
||||
// Clip colorLayer to its visible region, since ColorLayers are
|
||||
// allowed to paint outside the visible region. Here we rely on the
|
||||
// fact that uniform display items fill rectangles; obviously the
|
||||
@@ -1313,7 +1310,7 @@ ContainerState::PopThebesLayerData()
|
||||
if (!layer->GetTransform().Is2D(&transform)) {
|
||||
NS_ERROR("Only 2D transformations currently supported");
|
||||
}
|
||||
|
||||
|
||||
// ImageLayers are already configured with a visible region
|
||||
if (!imageContainer) {
|
||||
NS_ASSERTION(!transform.HasNonIntegerTranslation(),
|
||||
@@ -1643,9 +1640,9 @@ PaintInactiveLayer(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
nsRefPtr<gfxContext> context = aContext;
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
nsRefPtr<gfxASurface> surf;
|
||||
nsRefPtr<gfxASurface> surf;
|
||||
if (gfxUtils::sDumpPainting) {
|
||||
surf = gfxPlatform::GetPlatform()->CreateOffscreenSurface(itemVisibleRect.Size(),
|
||||
surf = gfxPlatform::GetPlatform()->CreateOffscreenSurface(itemVisibleRect.Size(),
|
||||
gfxASurface::CONTENT_COLOR_ALPHA);
|
||||
surf->SetDeviceOffset(-itemVisibleRect.TopLeft());
|
||||
context = new gfxContext(surf);
|
||||
@@ -1678,7 +1675,7 @@ PaintInactiveLayer(nsDisplayListBuilder* aBuilder,
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
if (gfxUtils::sDumpPainting) {
|
||||
DumpPaintedImage(aItem, surf);
|
||||
|
||||
|
||||
surf->SetDeviceOffset(gfxPoint(0, 0));
|
||||
aContext->SetSource(surf, itemVisibleRect.TopLeft());
|
||||
aContext->Rectangle(itemVisibleRect);
|
||||
@@ -2124,9 +2121,9 @@ ChooseScaleAndSetTransform(FrameLayerBuilder* aLayerBuilder,
|
||||
scale = gfxSize(1.0, 1.0);
|
||||
}
|
||||
|
||||
// Apply the inverse of our resolution-scale before the rest of our transform
|
||||
transform = gfx3DMatrix::ScalingMatrix(1.0/scale.width, 1.0/scale.height, 1.0)*transform;
|
||||
aLayer->SetTransform(transform);
|
||||
// Store the inverse of our resolution-scale on the layer
|
||||
aLayer->SetScale(1.0f/float(scale.width), 1.0f/float(scale.height));
|
||||
|
||||
FrameLayerBuilder::ContainerParameters
|
||||
result(scale.width, scale.height, aIncomingScale);
|
||||
@@ -2555,8 +2552,8 @@ static void DebugPaintItem(nsRenderingContext* aDest, nsDisplayItem *aItem, nsDi
|
||||
gfxRect bounds(appUnitBounds.x, appUnitBounds.y, appUnitBounds.width, appUnitBounds.height);
|
||||
bounds.ScaleInverse(aDest->AppUnitsPerDevPixel());
|
||||
|
||||
nsRefPtr<gfxASurface> surf =
|
||||
gfxPlatform::GetPlatform()->CreateOffscreenSurface(gfxIntSize(bounds.width, bounds.height),
|
||||
nsRefPtr<gfxASurface> surf =
|
||||
gfxPlatform::GetPlatform()->CreateOffscreenSurface(gfxIntSize(bounds.width, bounds.height),
|
||||
gfxASurface::CONTENT_COLOR_ALPHA);
|
||||
surf->SetDeviceOffset(-bounds.TopLeft());
|
||||
nsRefPtr<gfxContext> context = new gfxContext(surf);
|
||||
@@ -2566,7 +2563,7 @@ static void DebugPaintItem(nsRenderingContext* aDest, nsDisplayItem *aItem, nsDi
|
||||
aItem->Paint(aBuilder, ctx);
|
||||
DumpPaintedImage(aItem, surf);
|
||||
aItem->SetPainted();
|
||||
|
||||
|
||||
surf->SetDeviceOffset(gfxPoint(0, 0));
|
||||
aDest->ThebesContext()->SetSource(surf, bounds.TopLeft());
|
||||
aDest->ThebesContext()->Rectangle(bounds);
|
||||
@@ -3024,7 +3021,7 @@ CalculateBounds(nsTArray<FrameLayerBuilder::Clip::RoundedRect> aRects, PRInt32 A
|
||||
|
||||
void
|
||||
ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aClip,
|
||||
PRUint32 aRoundedRectClipCount)
|
||||
PRUint32 aRoundedRectClipCount)
|
||||
{
|
||||
// don't build an unnecessary mask
|
||||
nsIntRect layerBounds = aLayer->GetVisibleRegion().GetBounds();
|
||||
@@ -3050,7 +3047,7 @@ ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aCl
|
||||
aLayer->SetMaskLayer(maskLayer);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// calculate a more precise bounding rect
|
||||
const PRInt32 A2D = mContainerFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
gfxRect boundingRect = CalculateBounds(newData.mRoundedClipRects, A2D);
|
||||
|
||||
Reference in New Issue
Block a user