diff --git a/gfx/layers/basic/BasicLayers.cpp b/gfx/layers/basic/BasicLayers.cpp index 2cc07308f77..3d8a391ec05 100644 --- a/gfx/layers/basic/BasicLayers.cpp +++ b/gfx/layers/basic/BasicLayers.cpp @@ -713,12 +713,13 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext, { PRUint32 flags = 0; +#ifndef MOZ_GFX_OPTIMIZE_MOBILE gfxMatrix transform; if (!GetEffectiveTransform().CanDraw2D(&transform) || - transform.HasNonIntegerTranslation() || - MustRetainContent() /*<=> has shadow layer*/) { + transform.HasNonIntegerTranslation()) { flags |= ThebesLayerBuffer::PAINT_WILL_RESAMPLE; } +#endif Buffer::PaintState state = mBuffer.BeginPaint(this, contentType, flags); mValidRegion.Sub(mValidRegion, state.mRegionToInvalidate); diff --git a/gfx/layers/opengl/ThebesLayerOGL.cpp b/gfx/layers/opengl/ThebesLayerOGL.cpp index e8b2687cd1e..23c9ede0f12 100644 --- a/gfx/layers/opengl/ThebesLayerOGL.cpp +++ b/gfx/layers/opengl/ThebesLayerOGL.cpp @@ -749,8 +749,9 @@ ThebesLayerOGL::RenderLayer(int aPreviousFrameBuffer, CanUseOpaqueSurface() ? gfxASurface::CONTENT_COLOR : gfxASurface::CONTENT_COLOR_ALPHA; - gfxMatrix transform2d; PRUint32 flags = 0; +#ifndef MOZ_GFX_OPTIMIZE_MOBILE + gfxMatrix transform2d; if (GetEffectiveTransform().Is2D(&transform2d)) { if (transform2d.HasNonIntegerTranslation()) { flags |= ThebesLayerBufferOGL::PAINT_WILL_RESAMPLE; @@ -758,6 +759,7 @@ ThebesLayerOGL::RenderLayer(int aPreviousFrameBuffer, } else { flags |= ThebesLayerBufferOGL::PAINT_WILL_RESAMPLE; } +#endif Buffer::PaintState state = mBuffer->BeginPaint(contentType, flags); mValidRegion.Sub(mValidRegion, state.mRegionToInvalidate);