Followup to bug 635373: Shadow-layer buffers might be resampled in the chrome process. r=roc a=b
authorChris Jones <jones.chris.g@gmail.com>
Wed, 09 Mar 2011 11:28:26 -0600
changeset 63373 5b58ca341da48709e4e72ebd2547a60a52a89c0c
parent 63372 54f451b29081be265e0b4fa1c794c0b8c4acc8ac
child 63374 71c15b2de18ed8534d6a55a82964666d45f05c96
push idunknown
push userunknown
push dateunknown
reviewersroc, b
bugs635373
milestone2.0b13pre
Followup to bug 635373: Shadow-layer buffers might be resampled in the chrome process. r=roc a=b
gfx/layers/basic/BasicLayers.cpp
--- a/gfx/layers/basic/BasicLayers.cpp
+++ b/gfx/layers/basic/BasicLayers.cpp
@@ -582,17 +582,18 @@ BasicThebesLayer::PaintThebes(gfxContext
 
   {
     gfxSize scale = aContext->CurrentMatrix().ScaleFactors(PR_TRUE);
     float paintXRes = BasicManager()->XResolution() * gfxUtils::ClampToScaleFactor(scale.width);
     float paintYRes = BasicManager()->YResolution() * gfxUtils::ClampToScaleFactor(scale.height);
     PRUint32 flags = 0;
     gfxMatrix transform;
     if (!GetEffectiveTransform().Is2D(&transform) ||
-        transform.HasNonIntegerTranslation()) {
+        transform.HasNonIntegerTranslation() ||
+        MustRetainContent() /*<=> has shadow layer*/) {
       flags |= ThebesLayerBuffer::PAINT_WILL_RESAMPLE;
     }
     Buffer::PaintState state =
       mBuffer.BeginPaint(this, contentType, paintXRes, paintYRes, flags);
     mValidRegion.Sub(mValidRegion, state.mRegionToInvalidate);
 
     if (state.mContext) {
       // The area that became invalid and is visible needs to be repainted