Bug 948221 - Part 5: Make GetSourceSurfaceForSurface use the screen reference draw target if one isn't specified. r=Bas

This commit is contained in:
Matt Woodrow 2013-12-12 10:05:26 +13:00
parent d5e6569ce5
commit c40c4b1a78

View File

@ -719,6 +719,14 @@ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurfa
return nullptr;
}
if (!aTarget) {
if (ScreenReferenceDrawTarget()) {
aTarget = ScreenReferenceDrawTarget();
} else {
return nullptr;
}
}
void *userData = aSurface->GetData(&kSourceSurface);
if (userData) {