diff --git a/gfx/thebes/gfxD2DSurface.cpp b/gfx/thebes/gfxD2DSurface.cpp index dfa1ef1884f5..88aa6600b1dd 100644 --- a/gfx/thebes/gfxD2DSurface.cpp +++ b/gfx/thebes/gfxD2DSurface.cpp @@ -54,6 +54,14 @@ gfxD2DSurface::gfxD2DSurface(HANDLE handle, gfxContentType aContent) (cairo_content_t)aContent)); } +gfxD2DSurface::gfxD2DSurface(ID3D10Texture2D *texture, gfxContentType aContent) +{ + Init(cairo_d2d_surface_create_for_texture( + gfxWindowsPlatform::GetPlatform()->GetD2DDevice(), + texture, + (cairo_content_t)aContent)); +} + gfxD2DSurface::gfxD2DSurface(cairo_surface_t *csurf) { Init(csurf, PR_TRUE); diff --git a/gfx/thebes/gfxD2DSurface.h b/gfx/thebes/gfxD2DSurface.h index 3a08ffc5e103..d559da9fd8c4 100644 --- a/gfx/thebes/gfxD2DSurface.h +++ b/gfx/thebes/gfxD2DSurface.h @@ -42,6 +42,8 @@ #include +struct ID3D10Texture2D; + class THEBES_API gfxD2DSurface : public gfxASurface { public: @@ -53,6 +55,8 @@ public: gfxD2DSurface(HANDLE handle, gfxContentType aContent); + gfxD2DSurface(ID3D10Texture2D *texture, gfxContentType aContent); + gfxD2DSurface(cairo_surface_t *csurf); virtual ~gfxD2DSurface();