Backed out changeset e6760c16df72 (bug 1319626)

This commit is contained in:
Carsten "Tomcat" Book 2016-11-24 17:02:27 +01:00
Родитель fc781d5a09
Коммит 00e25fe58c
3 изменённых файлов: 0 добавлений и 88 удалений

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

@ -447,7 +447,6 @@ private:
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.print-histogram", FPSPrintHistogram, bool, false);
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.write-to-file", WriteFPSToFile, bool, false);
DECL_GFX_PREF(Once, "layers.acceleration.force-enabled", LayersAccelerationForceEnabledDoNotUseDirectly, bool, false);
DECL_GFX_PREF(Live, "layers.advanced.border-layers", LayersAllowBorderLayers, bool, false);
DECL_GFX_PREF(Live, "layers.advanced.text-layers", LayersAllowTextLayers, bool, false);
DECL_GFX_PREF(Once, "layers.allow-d3d9-fallback", LayersAllowD3D9Fallback, bool, false);
DECL_GFX_PREF(Once, "layers.amd-switchable-gfx.enabled", LayersAMDSwitchableGfxEnabled, bool, false);

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

@ -36,7 +36,6 @@
#include "nsIScrollableFrame.h"
#include "nsIFrameInlines.h"
#include "nsThemeConstants.h"
#include "BorderConsts.h"
#include "LayerTreeInvalidation.h"
#include "imgIContainer.h"
@ -4058,80 +4057,6 @@ nsDisplayBorder::ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
}
}
LayerState
nsDisplayBorder::GetLayerState(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aParameters)
{
if (!gfxPrefs::LayersAllowBorderLayers()) {
return LAYER_NONE;
}
nsPoint offset = ToReferenceFrame();
Maybe<nsCSSBorderRenderer> br =
nsCSSRendering::CreateBorderRenderer(mFrame->PresContext(),
nullptr,
mFrame,
nsRect(),
nsRect(offset, mFrame->GetSize()),
mFrame->StyleContext(),
mFrame->GetSkipSides());
if (!br) {
return LAYER_NONE;
}
bool hasCompositeColors;
if (!br->AllBordersSolid(&hasCompositeColors) || hasCompositeColors) {
return LAYER_NONE;
}
// We don't support this yet as we don't copy the values to
// the layer, and BasicBorderLayer doesn't support it yet.
if (!br->mNoBorderRadius) {
return LAYER_NONE;
}
// We copy these values correctly to the layer, but BasicBorderLayer
// won't render them
if (!br->AreBorderSideFinalStylesSame(SIDE_BITS_ALL) ||
!br->AllBordersSameWidth()) {
return LAYER_NONE;
}
NS_FOR_CSS_SIDES(i) {
if (br->mBorderStyles[i] == NS_STYLE_BORDER_STYLE_SOLID) {
mColors[i] = ToDeviceColor(br->mBorderColors[i]);
mWidths[i] = br->mBorderWidths[i];
} else {
mWidths[i] = 0;
}
}
mRect = ViewAs<LayerPixel>(br->mOuterRect);
return LAYER_INACTIVE;
}
already_AddRefed<Layer>
nsDisplayBorder::BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aContainerParameters)
{
RefPtr<BorderLayer> layer = static_cast<BorderLayer*>
(aManager->GetLayerBuilder()->GetLeafLayerFor(aBuilder, this));
if (!layer) {
layer = aManager->CreateBorderLayer();
if (!layer)
return nullptr;
}
layer->SetRect(mRect);
layer->SetCornerRadii({ LayerSize(), LayerSize(), LayerSize(), LayerSize() });
layer->SetColors(mColors);
layer->SetWidths(mWidths);
layer->SetBaseTransform(gfx::Matrix4x4::Translation(aContainerParameters.mOffset.x,
aContainerParameters.mOffset.y, 0));
return layer.forget();
}
void
nsDisplayBorder::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) {

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

@ -14,7 +14,6 @@
#define NSDISPLAYLIST_H_
#include "mozilla/Attributes.h"
#include "mozilla/Array.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/EnumSet.h"
#include "mozilla/Maybe.h"
@ -2558,13 +2557,6 @@ public:
virtual bool IsInvisibleInRect(const nsRect& aRect) override;
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) override;
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aParameters) override;
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aContainerParameters) override;
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) override;
NS_DISPLAY_DECL_NAME("Border", TYPE_BORDER)
@ -2577,10 +2569,6 @@ public:
protected:
nsRect CalculateBounds(const nsStyleBorder& aStyleBorder);
mozilla::Array<mozilla::gfx::Color, 4> mColors;
mozilla::Array<mozilla::LayerCoord, 4> mWidths;
mozilla::LayerRect mRect;
nsRect mBounds;
};