Bug 593361. Part 2. Don't bother trying to draw directly to the backbuffer instead of retaining ThebesLayer, if the backbuffer is transparent anyway. r=tnikkel
This commit is contained in:
@@ -378,9 +378,18 @@ ShouldRetainTransparentSurface(PRUint32 aContentFlags,
|
||||
case gfxASurface::TEXT_QUALITY_OK:
|
||||
return PR_TRUE;
|
||||
case gfxASurface::TEXT_QUALITY_OK_OVER_OPAQUE_PIXELS:
|
||||
// Retain the buffer if all text is over opaque pixels. Otherwise,
|
||||
// don't retain the buffer, in the hope that the backbuffer has
|
||||
// opaque pixels where our layer does not.
|
||||
return (aContentFlags & Layer::CONTENT_NO_TEXT_OVER_TRANSPARENT) != 0;
|
||||
case gfxASurface::TEXT_QUALITY_BAD:
|
||||
// If the backbuffer is opaque, then draw directly into it to get
|
||||
// subpixel AA. If the backbuffer is not an opaque format, then we won't get
|
||||
// subpixel AA by drawing into it, so we might as well retain.
|
||||
return aTargetSurface->GetContentType() != gfxASurface::CONTENT_COLOR;
|
||||
default:
|
||||
return PR_FALSE;
|
||||
NS_ERROR("Unknown quality type");
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user