From 6bca62e7c79747089d2f093992a491aba0dbbeff Mon Sep 17 00:00:00 2001 From: Benjamin Stover Date: Mon, 29 Aug 2011 10:56:50 -0700 Subject: [PATCH] Bug 634759 Allow buffer rotation for mobile r=roc --- gfx/layers/basic/BasicLayers.cpp | 5 +++-- gfx/layers/opengl/ThebesLayerOGL.cpp | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) 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);