diff options
-rw-r--r-- | build/moz.configure/old.configure | 1 | ||||
-rw-r--r-- | dom/canvas/WebGLContext.cpp | 6 | ||||
-rw-r--r-- | gfx/cairo/cairo/src/cairo-image-surface.c | 10 | ||||
-rw-r--r-- | gfx/cairo/cairo/src/cairoint.h | 6 | ||||
-rw-r--r-- | gfx/cairo/libpixman/src/pixman-private.h | 6 | ||||
-rw-r--r-- | gfx/layers/Layers.cpp | 4 | ||||
-rw-r--r-- | gfx/layers/RotatedBuffer.cpp | 12 | ||||
-rw-r--r-- | gfx/layers/client/ClientPaintedLayer.cpp | 2 | ||||
-rw-r--r-- | gfx/layers/client/ClientTiledPaintedLayer.cpp | 2 | ||||
-rw-r--r-- | gfx/layers/client/TiledContentClient.cpp | 13 | ||||
-rw-r--r-- | gfx/layers/composite/ContentHost.cpp | 4 | ||||
-rw-r--r-- | gfx/layers/composite/TiledContentHost.cpp | 2 | ||||
-rw-r--r-- | gfx/thebes/gfxFontMissingGlyphs.cpp | 8 | ||||
-rw-r--r-- | gfx/thebes/gfxPrefs.h | 8 | ||||
-rw-r--r-- | gfx/thebes/gfxUtils.cpp | 66 | ||||
-rw-r--r-- | layout/base/FrameLayerBuilder.cpp | 6 | ||||
-rw-r--r-- | layout/base/nsDisplayList.cpp | 4 | ||||
-rw-r--r-- | layout/base/nsPresShell.cpp | 4 | ||||
-rw-r--r-- | layout/generic/nsCanvasFrame.cpp | 4 | ||||
-rw-r--r-- | layout/generic/nsPluginFrame.cpp | 6 | ||||
-rw-r--r-- | old-configure.in | 19 |
21 files changed, 0 insertions, 193 deletions
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure index 7b1d462c49..5d81ad5214 100644 --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -200,7 +200,6 @@ def old_configure_options(*options): '--enable-logrefcnt', '--enable-maintenance-service', '--enable-memory-sanitizer', - '--enable-mobile-optimize', '--enable-mozril-geoloc', '--enable-necko-wifi', '--enable-negotiateauth', diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index e2e05e5fd3..ad54aa388b 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -1078,14 +1078,8 @@ WebGLContext::ClearBackbufferIfNeeded() void WebGLContext::LoseOldestWebGLContextIfLimitExceeded() { -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - // some mobile devices can't have more than 8 GL contexts overall - const size_t kMaxWebGLContextsPerPrincipal = 2; - const size_t kMaxWebGLContexts = 4; -#else const size_t kMaxWebGLContextsPerPrincipal = 16; const size_t kMaxWebGLContexts = 32; -#endif MOZ_ASSERT(kMaxWebGLContextsPerPrincipal < kMaxWebGLContexts); if (!NS_IsMainThread()) { diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c index ad0737157f..cc496ece53 100644 --- a/gfx/cairo/cairo/src/cairo-image-surface.c +++ b/gfx/cairo/cairo/src/cairo-image-surface.c @@ -4064,13 +4064,7 @@ _cairo_image_surface_glyphs (void *abstract_surface, composite_glyphs_info_t glyph_info; cairo_clip_t local_clip; cairo_bool_t have_clip = FALSE; -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - // For performance reasons we don't want to use two passes for overlapping glyphs - // on mobile - cairo_bool_t overlap = FALSE; -#else cairo_bool_t overlap; -#endif cairo_status_t status; cairo_rectangle_int_t rect; @@ -4084,11 +4078,7 @@ _cairo_image_surface_glyphs (void *abstract_surface, scaled_font, glyphs, num_glyphs, clip, -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - NULL); -#else &overlap); -#endif if (unlikely (status)) return status; diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h index 3627cd288b..2f638f2d7f 100644 --- a/gfx/cairo/cairo/src/cairoint.h +++ b/gfx/cairo/cairo/src/cairoint.h @@ -903,13 +903,7 @@ typedef struct _cairo_traps { #endif #define CAIRO_GSTATE_OPERATOR_DEFAULT CAIRO_OPERATOR_OVER -#ifdef MOZ_GFX_OPTIMIZE_MOBILE -// Skia uses a tolerance of 0.5 we'll use something more -// tolerant for now -#define CAIRO_GSTATE_TOLERANCE_DEFAULT 0.3 -#else #define CAIRO_GSTATE_TOLERANCE_DEFAULT 0.1 -#endif #define CAIRO_GSTATE_FILL_RULE_DEFAULT CAIRO_FILL_RULE_WINDING #define CAIRO_GSTATE_LINE_WIDTH_DEFAULT 2.0 #define CAIRO_GSTATE_LINE_CAP_DEFAULT CAIRO_LINE_CAP_BUTT diff --git a/gfx/cairo/libpixman/src/pixman-private.h b/gfx/cairo/libpixman/src/pixman-private.h index 6af073b55a..2313e65583 100644 --- a/gfx/cairo/libpixman/src/pixman-private.h +++ b/gfx/cairo/libpixman/src/pixman-private.h @@ -9,13 +9,7 @@ #ifndef MOZILLA_VERSION #error "Need mozilla headers" #endif -#ifdef MOZ_GFX_OPTIMIZE_MOBILE -#define LOW_QUALITY_INTERPOLATION -#define LOWER_QUALITY_INTERPOLATION -#define BILINEAR_INTERPOLATION_BITS 4 -#else #define BILINEAR_INTERPOLATION_BITS 7 -#endif #define BILINEAR_INTERPOLATION_RANGE (1 << BILINEAR_INTERPOLATION_BITS) /* diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index 482d809a1f..991e8ed2f0 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -1399,11 +1399,7 @@ ContainerLayer::DefaultComputeEffectiveTransforms(const Matrix4x4& aTransformToS checkClipRect = true; checkMaskLayers = true; } else { -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - if (!contTransform.PreservesAxisAlignedRectangles()) { -#else if (gfx::ThebesMatrix(contTransform).HasNonIntegerTranslation()) { -#endif checkClipRect = true; } /* In 2D case, only translation and/or positive scaling can be done w/o using IntermediateSurface. diff --git a/gfx/layers/RotatedBuffer.cpp b/gfx/layers/RotatedBuffer.cpp index 92252fb044..f0114bddf5 100644 --- a/gfx/layers/RotatedBuffer.cpp +++ b/gfx/layers/RotatedBuffer.cpp @@ -139,21 +139,13 @@ RotatedBuffer::DrawBufferQuadrant(gfx::DrawTarget* aTarget, transform *= oldTransform; transform *= inverseMask; -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - SurfacePattern source(snapshot, ExtendMode::CLAMP, transform, SamplingFilter::POINT); -#else SurfacePattern source(snapshot, ExtendMode::CLAMP, transform); -#endif aTarget->SetTransform(*aMaskTransform); aTarget->MaskSurface(source, aMask, Point(0, 0), DrawOptions(aOpacity, aOperator)); aTarget->SetTransform(oldTransform); } else { -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - DrawSurfaceOptions options(SamplingFilter::POINT); -#else DrawSurfaceOptions options; -#endif aTarget->DrawSurface(snapshot, IntRectToRect(fillRect), GetSourceRectangle(aXSide, aYSide), options, @@ -466,9 +458,6 @@ RotatedContentBuffer::BeginPaint(PaintedLayer* aLayer, } if (mode == SurfaceMode::SURFACE_COMPONENT_ALPHA) { -#if defined(MOZ_GFX_OPTIMIZE_MOBILE) - mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA; -#else if (!aLayer->GetParent() || !aLayer->GetParent()->SupportsComponentAlphaChildren() || !aLayer->AsShadowableLayer() || @@ -477,7 +466,6 @@ RotatedContentBuffer::BeginPaint(PaintedLayer* aLayer, } else { result.mContentType = gfxContentType::COLOR; } -#endif } if ((aFlags & PAINT_WILL_RESAMPLE) && diff --git a/gfx/layers/client/ClientPaintedLayer.cpp b/gfx/layers/client/ClientPaintedLayer.cpp index 871f10559b..150eadebf2 100644 --- a/gfx/layers/client/ClientPaintedLayer.cpp +++ b/gfx/layers/client/ClientPaintedLayer.cpp @@ -39,7 +39,6 @@ ClientPaintedLayer::PaintThebes() "Can only draw in drawing phase"); uint32_t flags = RotatedContentBuffer::PAINT_CAN_DRAW_ROTATED; -#ifndef MOZ_IGNORE_PAINT_WILL_RESAMPLE if (ClientManager()->CompositorMightResample()) { flags |= RotatedContentBuffer::PAINT_WILL_RESAMPLE; } @@ -48,7 +47,6 @@ ClientPaintedLayer::PaintThebes() flags |= RotatedContentBuffer::PAINT_WILL_RESAMPLE; } } -#endif PaintState state = mContentClient->BeginPaintBuffer(this, flags); mValidRegion.Sub(mValidRegion, state.mRegionToInvalidate); diff --git a/gfx/layers/client/ClientTiledPaintedLayer.cpp b/gfx/layers/client/ClientTiledPaintedLayer.cpp index 599fb972c4..8936dad8fe 100644 --- a/gfx/layers/client/ClientTiledPaintedLayer.cpp +++ b/gfx/layers/client/ClientTiledPaintedLayer.cpp @@ -462,7 +462,6 @@ ClientTiledPaintedLayer::RenderLayer() TILING_LOG("TILING %p: Initial low-precision valid region %s\n", this, Stringify(mLowPrecisionValidRegion).c_str()); nsIntRegion neededRegion = mVisibleRegion.ToUnknownRegion(); -#ifndef MOZ_IGNORE_PAINT_WILL_RESAMPLE // This is handled by PadDrawTargetOutFromRegion in TiledContentClient for mobile if (MayResample()) { // If we're resampling then bilinear filtering can read up to 1 pixel @@ -477,7 +476,6 @@ ClientTiledPaintedLayer::RenderLayer() padded.IntersectRect(padded, wholeTiles); neededRegion = padded; } -#endif nsIntRegion invalidRegion; invalidRegion.Sub(neededRegion, mValidRegion); diff --git a/gfx/layers/client/TiledContentClient.cpp b/gfx/layers/client/TiledContentClient.cpp index 164e76da8c..5dad3ec65e 100644 --- a/gfx/layers/client/TiledContentClient.cpp +++ b/gfx/layers/client/TiledContentClient.cpp @@ -308,30 +308,17 @@ ClientTiledLayerBuffer::GetContentType(SurfaceMode* aMode) const SurfaceMode mode = mPaintedLayer.GetSurfaceMode(); if (mode == SurfaceMode::SURFACE_COMPONENT_ALPHA) { -#if defined(MOZ_GFX_OPTIMIZE_MOBILE) - mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA; -#else if (!mPaintedLayer.GetParent() || !mPaintedLayer.GetParent()->SupportsComponentAlphaChildren()) { mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA; } else { content = gfxContentType::COLOR; } -#endif } else if (mode == SurfaceMode::SURFACE_OPAQUE) { -#if defined(MOZ_GFX_OPTIMIZE_MOBILE) - if (IsLowPrecision()) { - // If we're in low-res mode, drawing can sample from outside the visible - // region. Make sure that we only sample transparency if that happens. - mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA; - content = gfxContentType::COLOR_ALPHA; - } -#else if (mPaintedLayer.MayResample()) { mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA; content = gfxContentType::COLOR_ALPHA; } -#endif } if (aMode) { diff --git a/gfx/layers/composite/ContentHost.cpp b/gfx/layers/composite/ContentHost.cpp index b1d92a6c9e..86d33fdb64 100644 --- a/gfx/layers/composite/ContentHost.cpp +++ b/gfx/layers/composite/ContentHost.cpp @@ -71,7 +71,6 @@ ContentHostTexture::Composite(LayerComposite* aLayer, nsIntRegion tmpRegion; const nsIntRegion* renderRegion; -#ifndef MOZ_IGNORE_PAINT_WILL_RESAMPLE if (PaintWillResample()) { // If we're resampling, then the texture image will contain exactly the // entire visible region's bounds, and we should draw it all in one quad @@ -81,9 +80,6 @@ ContentHostTexture::Composite(LayerComposite* aLayer, } else { renderRegion = aVisibleRegion; } -#else - renderRegion = aVisibleRegion; -#endif nsIntRegion region(*renderRegion); nsIntPoint origin = GetOriginOffset(); diff --git a/gfx/layers/composite/TiledContentHost.cpp b/gfx/layers/composite/TiledContentHost.cpp index 7458c74971..a80c47fb98 100644 --- a/gfx/layers/composite/TiledContentHost.cpp +++ b/gfx/layers/composite/TiledContentHost.cpp @@ -425,7 +425,6 @@ TiledContentHost::Composite(LayerComposite* aLayer, nsIntRegion tmpRegion; const nsIntRegion* renderRegion = aVisibleRegion; -#ifndef MOZ_IGNORE_PAINT_WILL_RESAMPLE if (PaintWillResample()) { // If we're resampling, then the texture image will contain exactly the // entire visible region's bounds, and we should draw it all in one quad @@ -433,7 +432,6 @@ TiledContentHost::Composite(LayerComposite* aLayer, tmpRegion = aVisibleRegion->GetBounds(); renderRegion = &tmpRegion; } -#endif // Render the low and high precision buffers. RenderLayerBuffer(mLowPrecisionTiledBuffer, diff --git a/gfx/thebes/gfxFontMissingGlyphs.cpp b/gfx/thebes/gfxFontMissingGlyphs.cpp index 92ea5e9672..391166b587 100644 --- a/gfx/thebes/gfxFontMissingGlyphs.cpp +++ b/gfx/thebes/gfxFontMissingGlyphs.cpp @@ -155,7 +155,6 @@ static const Float BOX_BORDER_OPACITY = 0.5; * Quartz cairo backend which doesn't generally support masking with surfaces. * So for now we just paint a bunch of rectangles... */ -#ifndef MOZ_GFX_OPTIMIZE_MOBILE static void DrawHexChar(uint32_t aDigit, const Point& aPt, DrawTarget& aDrawTarget, const Pattern &aPattern) @@ -182,7 +181,6 @@ DrawHexChar(uint32_t aDigit, const Point& aPt, DrawTarget& aDrawTarget, RefPtr<Path> path = builder->Finish(); aDrawTarget.Fill(path, aPattern); } -#endif // MOZ_GFX_OPTIMIZE_MOBILE void gfxFontMissingGlyphs::DrawMissingGlyph(uint32_t aChar, @@ -209,15 +207,10 @@ gfxFontMissingGlyphs::DrawMissingGlyph(uint32_t aChar, if (!borderStrokeRect.IsEmpty()) { ColorPattern adjustedColor = color; color.mColor.a *= BOX_BORDER_OPACITY; -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - aDrawTarget.FillRect(borderStrokeRect, adjustedColor); -#else StrokeOptions strokeOptions(BOX_BORDER_WIDTH); aDrawTarget.StrokeRect(borderStrokeRect, adjustedColor, strokeOptions); -#endif } -#ifndef MOZ_GFX_OPTIMIZE_MOBILE Point center = aRect.Center(); Float halfGap = HEX_CHAR_GAP / 2.f; Float top = -(MINIFONT_HEIGHT + halfGap); @@ -266,7 +259,6 @@ gfxFontMissingGlyphs::DrawMissingGlyph(uint32_t aChar, Point(third, halfGap), aDrawTarget, color); } } -#endif } Float diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index c38352c0d5..5a2bde0792 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -460,15 +460,7 @@ private: DECL_GFX_PREF(Live, "layers.bench.enabled", LayersBenchEnabled, bool, false); DECL_GFX_PREF(Once, "layers.bufferrotation.enabled", BufferRotationEnabled, bool, true); DECL_GFX_PREF(Live, "layers.child-process-shutdown", ChildProcessShutdown, bool, true); -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - // If MOZ_GFX_OPTIMIZE_MOBILE is defined, we force component alpha off - // and ignore the preference. - DECL_GFX_PREF(Skip, "layers.componentalpha.enabled", ComponentAlphaEnabled, bool, false); -#else - // If MOZ_GFX_OPTIMIZE_MOBILE is not defined, we actually take the - // preference value, defaulting to true. DECL_GFX_PREF(Once, "layers.componentalpha.enabled", ComponentAlphaEnabled, bool, true); -#endif DECL_GFX_PREF(Live, "layers.composer2d.enabled", Composer2DCompositionEnabled, bool, false); DECL_GFX_PREF(Once, "layers.d3d11.force-warp", LayersD3D11ForceWARP, bool, false); DECL_GFX_PREF(Live, "layers.deaa.enabled", LayersDEAAEnabled, bool, false); diff --git a/gfx/thebes/gfxUtils.cpp b/gfx/thebes/gfxUtils.cpp index 401bceaa99..adc48b972f 100644 --- a/gfx/thebes/gfxUtils.cpp +++ b/gfx/thebes/gfxUtils.cpp @@ -378,7 +378,6 @@ gfxUtils::ConvertBGRAtoRGBA(uint8_t* aData, uint32_t aLength) libyuv::ABGRToARGB(aData, aLength, aData, aLength, aLength / 4, 1); } -#if !defined(MOZ_GFX_OPTIMIZE_MOBILE) /** * This returns the fastest operator to use for solid surfaces which have no * alpha channel or their alpha channel is uniformly opaque. @@ -448,66 +447,7 @@ CreateSamplingRestrictedDrawable(gfxDrawable* aDrawable, RefPtr<gfxDrawable> drawable = new gfxSurfaceDrawable(surface, size, gfxMatrix::Translation(-needed.TopLeft())); return drawable.forget(); } -#endif // !MOZ_GFX_OPTIMIZE_MOBILE -/* These heuristics are based on Source/WebCore/platform/graphics/skia/ImageSkia.cpp:computeResamplingMode() */ -#ifdef MOZ_GFX_OPTIMIZE_MOBILE -static SamplingFilter ReduceResamplingFilter(SamplingFilter aSamplingFilter, - int aImgWidth, int aImgHeight, - float aSourceWidth, float aSourceHeight) -{ - // Images smaller than this in either direction are considered "small" and - // are not resampled ever (see below). - const int kSmallImageSizeThreshold = 8; - - // The amount an image can be stretched in a single direction before we - // say that it is being stretched so much that it must be a line or - // background that doesn't need resampling. - const float kLargeStretch = 3.0f; - - if (aImgWidth <= kSmallImageSizeThreshold - || aImgHeight <= kSmallImageSizeThreshold) { - // Never resample small images. These are often used for borders and - // rules (think 1x1 images used to make lines). - return SamplingFilter::POINT; - } - - if (aImgHeight * kLargeStretch <= aSourceHeight || aImgWidth * kLargeStretch <= aSourceWidth) { - // Large image tiling detected. - - // Don't resample if it is being tiled a lot in only one direction. - // This is trying to catch cases where somebody has created a border - // (which might be large) and then is stretching it to fill some part - // of the page. - if (fabs(aSourceWidth - aImgWidth)/aImgWidth < 0.5 || fabs(aSourceHeight - aImgHeight)/aImgHeight < 0.5) - return SamplingFilter::POINT; - - // The image is growing a lot and in more than one direction. Resampling - // is slow and doesn't give us very much when growing a lot. - return aSamplingFilter; - } - - /* Some notes on other heuristics: - The Skia backend also uses nearest for backgrounds that are stretched by - a large amount. I'm not sure this is common enough for us to worry about - now. It also uses nearest for backgrounds/avoids high quality for images - that are very slightly scaled. I'm also not sure that very slightly - scaled backgrounds are common enough us to worry about. - - We don't currently have much support for doing high quality interpolation. - The only place this currently happens is on Quartz and we don't have as - much control over it as would be needed. Webkit avoids using high quality - resampling during load. It also avoids high quality if the transformation - is not just a scale and translation - - WebKit bug #40045 added code to avoid resampling different parts - of an image with different methods by using a resampling hint size. - It currently looks unused in WebKit but it's something to watch out for. - */ - - return aSamplingFilter; -} -#else static SamplingFilter ReduceResamplingFilter(SamplingFilter aSamplingFilter, int aImgWidth, int aImgHeight, int aSourceWidth, int aSourceHeight) @@ -515,7 +455,6 @@ static SamplingFilter ReduceResamplingFilter(SamplingFilter aSamplingFilter, // Just pass the filter through unchanged return aSamplingFilter; } -#endif #ifdef MOZ_WIDGET_COCOA // Only prescale a temporary surface if we're going to repeat it often. @@ -667,10 +606,6 @@ gfxUtils::DrawPixelSnapped(gfxContext* aContext, } #endif - // On Mobile, we don't ever want to do this; it has the potential for - // allocating very large temporary surfaces, especially since we'll - // do full-page snapshots often (see bug 749426). -#if !defined(MOZ_GFX_OPTIMIZE_MOBILE) RefPtr<gfxDrawable> restrictedDrawable = CreateSamplingRestrictedDrawable(aDrawable, aContext, aRegion, aFormat); @@ -682,7 +617,6 @@ gfxUtils::DrawPixelSnapped(gfxContext* aContext, // drawn without tiling. extendMode = ExtendMode::CLAMP; } -#endif } } 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); diff --git a/old-configure.in b/old-configure.in index 6f59e06cf3..e9d3da8a0b 100644 --- a/old-configure.in +++ b/old-configure.in @@ -3674,25 +3674,6 @@ dnl ======================================================== MOZ_ARG_HEADER(Runtime debugging and Optimizations) dnl ======================================================== -dnl enable mobile optimizations -dnl ======================================================== -MOZ_ARG_ENABLE_BOOL(mobile-optimize, -[ --enable-mobile-optimize - Enable mobile optimizations], - MOZ_GFX_OPTIMIZE_MOBILE=1) - -AC_SUBST(MOZ_GFX_OPTIMIZE_MOBILE) - -if test "$MOZ_GFX_OPTIMIZE_MOBILE"; then - # We ignore paint will resample on mobile for performance. - # We may want to revisit this later. - MOZ_IGNORE_PAINT_WILL_RESAMPLE=1 - - AC_DEFINE(MOZ_GFX_OPTIMIZE_MOBILE) - AC_DEFINE(MOZ_IGNORE_PAINT_WILL_RESAMPLE) -fi - -dnl ======================================================== dnl = Enable code optimization. ON by default. dnl ======================================================== if test -z "$MOZ_OPTIMIZE_FLAGS"; then |