mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 590403. If we are asked to create a similar surface and our underling surface isn't valid just return null. r=jmuizelaar
This commit is contained in:
parent
7e9cbdb239
commit
78f46f0276
@ -310,6 +310,10 @@ already_AddRefed<gfxASurface>
|
||||
gfxASurface::CreateSimilarSurface(gfxContentType aContent,
|
||||
const gfxIntSize& aSize)
|
||||
{
|
||||
if (!mSurface || !mSurfaceValid) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
cairo_surface_t *surface =
|
||||
cairo_surface_create_similar(mSurface, cairo_content_t(aContent),
|
||||
aSize.width, aSize.height);
|
||||
|
@ -182,6 +182,10 @@ already_AddRefed<gfxASurface>
|
||||
gfxXlibSurface::CreateSimilarSurface(gfxContentType aContent,
|
||||
const gfxIntSize& aSize)
|
||||
{
|
||||
if (!mSurface || !mSurfaceValid) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
if (aContent == CONTENT_COLOR) {
|
||||
// cairo_surface_create_similar will use a matching visual if it can.
|
||||
// However, systems with 16-bit or indexed default visuals may benefit
|
||||
|
Loading…
Reference in New Issue
Block a user