mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 934286: Ifdef Mozilla specific cairo function usage. r=mattwoodrow
This commit is contained in:
parent
c05f717a33
commit
196f0e4ade
@ -114,6 +114,7 @@ GetCairoSurfaceSize(cairo_surface_t* surface, IntSize& size)
|
||||
}
|
||||
#endif
|
||||
#ifdef CAIRO_HAS_WIN32_SURFACE
|
||||
#ifdef MOZ2D_HAS_MOZ_CAIRO
|
||||
case CAIRO_SURFACE_TYPE_WIN32:
|
||||
case CAIRO_SURFACE_TYPE_WIN32_PRINTING:
|
||||
{
|
||||
@ -121,6 +122,21 @@ GetCairoSurfaceSize(cairo_surface_t* surface, IntSize& size)
|
||||
size.height = cairo_win32_surface_get_height(surface);
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
case CAIRO_SURFACE_TYPE_WIN32:
|
||||
{
|
||||
cairo_surface_t *img = cairo_win32_surface_get_image(surface);
|
||||
|
||||
if (!img) {
|
||||
// XXX - fix me
|
||||
MOZ_ASSERT(false);
|
||||
return true;
|
||||
}
|
||||
size.width = cairo_image_surface_get_width(img);
|
||||
size.height = cairo_image_surface_get_height(img);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
VPATH = $(srcdir) $(srcdir)/unittest
|
||||
|
||||
DEFINES += -DMOZ_GFX -DUSE_CAIRO -DGFX2D_INTERNAL
|
||||
DEFINES += -DMOZ_GFX -DUSE_CAIRO -DGFX2D_INTERNAL -DMOZ2D_HAS_MOZ_CAIRO
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),$(findstring $(MOZ_WIDGET_TOOLKIT),android gtk2 gtk3 gonk qt))
|
||||
DEFINES += -DMOZ_ENABLE_FREETYPE
|
||||
|
Loading…
Reference in New Issue
Block a user