mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 764125; pretty sure this inverted logic will break something on windows; r=Bas
This commit is contained in:
parent
664ebc17a4
commit
6b3ab9ec43
@ -532,11 +532,8 @@ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurfa
|
|||||||
if (!srcBuffer) {
|
if (!srcBuffer) {
|
||||||
nsRefPtr<gfxImageSurface> imgSurface = aSurface->GetAsImageSurface();
|
nsRefPtr<gfxImageSurface> imgSurface = aSurface->GetAsImageSurface();
|
||||||
|
|
||||||
bool isWin32ImageSurf = false;
|
bool isWin32ImageSurf = imgSurface &&
|
||||||
|
aSurface->GetType() == gfxASurface::SurfaceTypeWin32;
|
||||||
if (imgSurface && aSurface->GetType() != gfxASurface::SurfaceTypeWin32) {
|
|
||||||
isWin32ImageSurf = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!imgSurface) {
|
if (!imgSurface) {
|
||||||
imgSurface = new gfxImageSurface(aSurface->GetSize(), OptimalFormatForContent(aSurface->GetContentType()));
|
imgSurface = new gfxImageSurface(aSurface->GetSize(), OptimalFormatForContent(aSurface->GetContentType()));
|
||||||
@ -572,8 +569,8 @@ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurfa
|
|||||||
|
|
||||||
if (!srcBuffer) {
|
if (!srcBuffer) {
|
||||||
// We need to check if our gfxASurface will keep the underlying data
|
// We need to check if our gfxASurface will keep the underlying data
|
||||||
// alive! This is true if gfxASurface actually -is- an ImageSurface or
|
// alive. This is true if gfxASurface actually -is- an ImageSurface or
|
||||||
// if it is a gfxWindowsSurface which supportes GetAsImageSurface.
|
// if it is a gfxWindowsSurface which supports GetAsImageSurface.
|
||||||
if (imgSurface != aSurface && !isWin32ImageSurf) {
|
if (imgSurface != aSurface && !isWin32ImageSurf) {
|
||||||
// This shouldn't happen for now, it can be easily supported by making
|
// This shouldn't happen for now, it can be easily supported by making
|
||||||
// a copy. For now let's just abort.
|
// a copy. For now let's just abort.
|
||||||
|
Loading…
Reference in New Issue
Block a user