summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-03-10 18:58:26 +0000
committerMoonchild <moonchild@palemoon.org>2021-03-10 18:58:26 +0000
commit515c1193c5663e46a313acb7a39ed2f3d209f69e (patch)
treec291e0ee9c44ec2c1fa2b1a56782cd630c571469 /layout
parent108ec40998d1b571f073d1e57de5fbf368bfe17c (diff)
downloaduxp-515c1193c5663e46a313acb7a39ed2f3d209f69e.tar.gz
Issue #1053 - Remove mobile-specific graphics "optimizations" (=compromises)
Diffstat (limited to 'layout')
-rw-r--r--layout/base/FrameLayerBuilder.cpp6
-rw-r--r--layout/base/nsDisplayList.cpp4
-rw-r--r--layout/base/nsPresShell.cpp4
-rw-r--r--layout/generic/nsCanvasFrame.cpp4
-rw-r--r--layout/generic/nsPluginFrame.cpp6
5 files changed, 0 insertions, 24 deletions
diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp
index 8695cd6503..d38b17adc4 100644
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -6275,14 +6275,8 @@ ContainerState::CreateMaskLayer(Layer *aLayer,
uint32_t maxSize = mManager->GetMaxTextureSize();
NS_ASSERTION(maxSize > 0, "Invalid max texture size");
-#ifdef MOZ_GFX_OPTIMIZE_MOBILE
- // Make mask image width aligned to 4. See Bug 1245552.
- gfx::Size surfaceSize(std::min<gfx::Float>(GetAlignedStride<4>(NSToIntCeil(boundingRect.Width()), 1), maxSize),
- std::min<gfx::Float>(boundingRect.Height(), maxSize));
-#else
gfx::Size surfaceSize(std::min<gfx::Float>(boundingRect.Width(), maxSize),
std::min<gfx::Float>(boundingRect.Height(), maxSize));
-#endif
// maskTransform is applied to the clip when it is painted into the mask (as a
// component of imageTransform), and its inverse used when the mask is used for
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp
index e2a41aa284..3cc8bbaa89 100644
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1488,11 +1488,7 @@ nsDisplayListBuilder::IsInWillChangeBudget(nsIFrame* aFrame,
return onBudget;
}
-#ifdef MOZ_GFX_OPTIMIZE_MOBILE
-const float gAGRBudgetAreaMultiplier = 0.3;
-#else
const float gAGRBudgetAreaMultiplier = 3.0;
-#endif
bool
nsDisplayListBuilder::AddToAGRBudget(nsIFrame* aFrame)
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index 9ba4ff462f..87435f8cfa 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -4592,11 +4592,7 @@ PresShell::RenderDocument(const nsRect& aRect, uint32_t aFlags,
nsPresContext::AppUnitsToFloatCSSPixels(aRect.width),
nsPresContext::AppUnitsToFloatCSSPixels(aRect.height));
aThebesContext->NewPath();
-#ifdef MOZ_GFX_OPTIMIZE_MOBILE
- aThebesContext->Rectangle(r, true);
-#else
aThebesContext->Rectangle(r);
-#endif
nsIFrame* rootFrame = mFrameConstructor->GetRootFrame();
if (!rootFrame) {
diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp
index 31baa040c1..61efb57e25 100644
--- a/layout/generic/nsCanvasFrame.cpp
+++ b/layout/generic/nsCanvasFrame.cpp
@@ -271,7 +271,6 @@ nsDisplayCanvasBackgroundColor::WriteDebugInfo(std::stringstream& aStream)
}
#endif
-#ifndef MOZ_GFX_OPTIMIZE_MOBILE
static void BlitSurface(DrawTarget* aDest, const gfxRect& aRect, DrawTarget* aSource)
{
RefPtr<SourceSurface> source = aSource->Snapshot();
@@ -279,7 +278,6 @@ static void BlitSurface(DrawTarget* aDest, const gfxRect& aRect, DrawTarget* aSo
Rect(aRect.x, aRect.y, aRect.width, aRect.height),
Rect(0, 0, aRect.width, aRect.height));
}
-#endif
void
nsDisplayCanvasBackgroundImage::Paint(nsDisplayListBuilder* aBuilder,
@@ -289,7 +287,6 @@ nsDisplayCanvasBackgroundImage::Paint(nsDisplayListBuilder* aBuilder,
nsPoint offset = ToReferenceFrame();
nsRect bgClipRect = frame->CanvasArea() + offset;
-#ifndef MOZ_GFX_OPTIMIZE_MOBILE
RefPtr<gfxContext> dest = aCtx->ThebesContext();
gfxRect destRect;
if (IsSingleFixedPositionImage(aBuilder, bgClipRect, &destRect) &&
@@ -322,7 +319,6 @@ nsDisplayCanvasBackgroundImage::Paint(nsDisplayListBuilder* aBuilder,
return;
}
}
-#endif
PaintInternal(aBuilder, aCtx, mVisibleRect, &bgClipRect);
}
diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp
index 442f8ca262..eee3f46b8b 100644
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1429,12 +1429,6 @@ nsPluginFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
imglayer->SetScaleToSize(size, ScaleMode::STRETCH);
imglayer->SetContainer(container);
SamplingFilter samplingFilter = nsLayoutUtils::GetSamplingFilterForFrame(this);
-#ifdef MOZ_GFX_OPTIMIZE_MOBILE
- if (!aManager->IsCompositingCheap()) {
- // Pixman just horrible with bilinear filter scaling
- samplingFilter = SamplingFilter::POINT;
- }
-#endif
imglayer->SetSamplingFilter(samplingFilter);
layer->SetContentFlags(IsOpaque() ? Layer::CONTENT_OPAQUE : 0);