зеркало из https://github.com/mozilla/gecko-dev.git
Bug 291817 - allow cairo to be used as the svg renderer on win32.
r=pavlov, a=asa.
This commit is contained in:
Родитель
977dfa358d
Коммит
94df15fb13
|
@ -108,3 +108,7 @@ endif
|
|||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/gfx/src/mac
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT), windows)
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/gfx/src/windows
|
||||
endif
|
||||
|
|
|
@ -56,6 +56,11 @@
|
|||
extern "C" {
|
||||
#include <cairo-quartz.h>
|
||||
}
|
||||
#elif defined(XP_WIN)
|
||||
#include "nsDrawingSurfaceWin.h"
|
||||
extern "C" {
|
||||
#include <cairo-win32.h>
|
||||
}
|
||||
#else
|
||||
#include "nsRenderingContextGTK.h"
|
||||
#include <gdk/gdkx.h>
|
||||
|
@ -154,6 +159,13 @@ nsSVGCairoCanvas::Init(nsIRenderingContext *ctx,
|
|||
cairo_set_target_quartz_context(mCR, mQuartzRef,
|
||||
portRect.right - portRect.left,
|
||||
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
|
||||
nsDrawingSurfaceGTK *surface;
|
||||
ctx->GetDrawingSurface((nsIDrawingSurface**)&surface);
|
||||
|
|
Загрузка…
Ссылка в новой задаче