зеркало из https://github.com/mozilla/gecko-dev.git
Bug 291897. Fix build breakage by having GNOMEShellService depend on widget and only try to use nsIGdkPixbufImage if we're a GTK2 build. r+sr=blizzard,a=asa
This commit is contained in:
Родитель
86d3db5b7b
Коммит
12836ce09e
|
@ -55,6 +55,7 @@ REQUIRES = \
|
|||
imglib2 \
|
||||
browsercomps \
|
||||
gfx \
|
||||
widget \
|
||||
pref \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -55,7 +55,9 @@
|
|||
#include "imgIRequest.h"
|
||||
#include "imgIContainer.h"
|
||||
#include "nsIImage.h"
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#include "nsIGdkPixbufImage.h"
|
||||
#endif
|
||||
#include "nsColor.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
@ -348,6 +350,9 @@ WriteImage(const nsCString& aPath, gfxIImageFrame* aImage)
|
|||
if (!img)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
#ifndef MOZ_WIDGET_GTK2
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
#else
|
||||
nsCOMPtr<nsIGdkPixbufImage> pixImg(do_QueryInterface(img));
|
||||
if (!pixImg)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
@ -361,6 +366,7 @@ WriteImage(const nsCString& aPath, gfxIImageFrame* aImage)
|
|||
aImage->UnlockImageData();
|
||||
g_object_unref(pixbuf);
|
||||
return res ? NS_OK : NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
Загрузка…
Ссылка в новой задаче