mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1100126 - Don't return garbage image data if we fail to blit the texture r=jgilbert
This commit is contained in:
parent
88468d1d91
commit
0b9b262baf
@ -61,9 +61,9 @@ GLImage::GetAsSourceSurface()
|
||||
|
||||
GLBlitHelper helper(sSnapshotContext);
|
||||
|
||||
helper.BlitImageToFramebuffer(this, size, fb.FB(), true);
|
||||
|
||||
ScopedBindFramebuffer bind(sSnapshotContext, fb.FB());
|
||||
if (!helper.BlitImageToFramebuffer(this, size, fb.FB(), true)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<gfx::DataSourceSurface> source =
|
||||
gfx::Factory::CreateDataSourceSurface(size, gfx::SurfaceFormat::B8G8R8A8);
|
||||
@ -71,6 +71,7 @@ GLImage::GetAsSourceSurface()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ScopedBindFramebuffer bind(sSnapshotContext, fb.FB());
|
||||
ReadPixelsIntoDataSurface(sSnapshotContext, source);
|
||||
return source.forget();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user