Bug 597950 - Part 2: Expose API to create a D2D surface from a D3D10 Texture. r=vlad

This commit is contained in:
Bas Schouten 2010-10-01 00:53:42 +02:00
parent afde1b864a
commit 81f24452aa
2 changed files with 12 additions and 0 deletions

View File

@ -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);

View File

@ -42,6 +42,8 @@
#include <windows.h>
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();