mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 291817 - allow cairo to be used as the svg renderer on win32.
r=pavlov, a=asa.
This commit is contained in:
parent
977dfa358d
commit
94df15fb13
@ -108,3 +108,7 @@ endif
|
|||||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||||
LOCAL_INCLUDES += -I$(topsrcdir)/gfx/src/mac
|
LOCAL_INCLUDES += -I$(topsrcdir)/gfx/src/mac
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(MOZ_WIDGET_TOOLKIT), windows)
|
||||||
|
LOCAL_INCLUDES += -I$(topsrcdir)/gfx/src/windows
|
||||||
|
endif
|
||||||
|
@ -56,6 +56,11 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <cairo-quartz.h>
|
#include <cairo-quartz.h>
|
||||||
}
|
}
|
||||||
|
#elif defined(XP_WIN)
|
||||||
|
#include "nsDrawingSurfaceWin.h"
|
||||||
|
extern "C" {
|
||||||
|
#include <cairo-win32.h>
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#include "nsRenderingContextGTK.h"
|
#include "nsRenderingContextGTK.h"
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
@ -154,6 +159,13 @@ nsSVGCairoCanvas::Init(nsIRenderingContext *ctx,
|
|||||||
cairo_set_target_quartz_context(mCR, mQuartzRef,
|
cairo_set_target_quartz_context(mCR, mQuartzRef,
|
||||||
portRect.right - portRect.left,
|
portRect.right - portRect.left,
|
||||||
portRect.bottom - portRect.top);
|
portRect.bottom - portRect.top);
|
||||||
|
#elif defined(XP_WIN)
|
||||||
|
nsDrawingSurfaceWin *surface;
|
||||||
|
HDC hdc;
|
||||||
|
ctx->GetDrawingSurface((nsIDrawingSurface**)&surface);
|
||||||
|
surface->GetDimensions(&mWidth, &mHeight);
|
||||||
|
surface->GetDC(&hdc);
|
||||||
|
cairo_set_target_win32(mCR, hdc);
|
||||||
#else
|
#else
|
||||||
nsDrawingSurfaceGTK *surface;
|
nsDrawingSurfaceGTK *surface;
|
||||||
ctx->GetDrawingSurface((nsIDrawingSurface**)&surface);
|
ctx->GetDrawingSurface((nsIDrawingSurface**)&surface);
|
||||||
|
Loading…
Reference in New Issue
Block a user