зеркало из https://github.com/mozilla/pjs.git
imported patch returnnullincreatesimilar
This commit is contained in:
Родитель
ef693cc893
Коммит
2f416d4188
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче