Bug 933019, part 8 - Remove code for handling Thebes backed gfxContext in nsNativeThemeCocoa.mm. r=Bas

This commit is contained in:
Jonathan Watt 2014-07-10 10:58:08 +01:00
parent 51f820ee47
commit fd4b4191fa

View File

@ -2256,14 +2256,9 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsRenderingContext* aContext,
case NS_THEME_MENUITEM:
case NS_THEME_CHECKMENUITEM: {
bool isTransparent;
if (thebesCtx->IsCairo()) {
isTransparent = thebesCtx->OriginalSurface()->GetContentType() == gfxContentType::COLOR_ALPHA;
} else {
SurfaceFormat format = thebesCtx->GetDrawTarget()->GetFormat();
isTransparent = (format == SurfaceFormat::R8G8B8A8) ||
(format == SurfaceFormat::B8G8R8A8);
}
SurfaceFormat format = thebesCtx->GetDrawTarget()->GetFormat();
bool isTransparent = (format == SurfaceFormat::R8G8B8A8) ||
(format == SurfaceFormat::B8G8R8A8);
if (isTransparent) {
// Clear the background to get correct transparency.
CGContextClearRect(cgContext, macRect);