mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-29 02:17:45 -10:00
Bug 1303570 - Part 2: When using Cairo use gfxWindowsSurfaces when creating surfaces in ContentClientBasic. r=jrmuizel
MozReview-Commit-ID: Bf4vdtiXNf3
This commit is contained in:
1 parent
e664957791
commit
30c5786aaa
1 file changed
+16
-2
@@ -132,9 +132,23 @@ ContentClientBasic::CreateBuffer(ContentType aType,
|
||||
gfxDevCrash(LogReason::AlphaWithBasicClient) << "Asking basic content client for component alpha";
|
||||
}
|
||||
|
||||
IntSize size(aRect.width, aRect.height);
|
||||
#ifdef XP_WIN
|
||||
if (mBackend == BackendType::CAIRO &&
|
||||
(aType == gfxContentType::COLOR || aType == gfxContentType::COLOR_ALPHA)) {
|
||||
RefPtr<gfxASurface> surf =
|
||||
new gfxWindowsSurface(size, aType == gfxContentType::COLOR ? gfxImageFormat::X8R8G8B8_UINT32 :
|
||||
gfxImageFormat::A8R8G8B8_UINT32);
|
||||
*aBlackDT = gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(surf, size);
|
||||
|
||||
if (*aBlackDT) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
*aBlackDT = gfxPlatform::GetPlatform()->CreateDrawTargetForBackend(
|
||||
mBackend,
|
||||
IntSize(aRect.width, aRect.height),
|
||||
mBackend, size,
|
||||
gfxPlatform::GetPlatform()->Optimal2DFormatForContent(aType));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user