2010-02-26 06:36:07 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
2012-05-21 11:12:37 +00:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-02-26 06:36:07 +00:00
|
|
|
|
|
|
|
#ifndef GFX_D2DSURFACE_H
|
|
|
|
#define GFX_D2DSURFACE_H
|
|
|
|
|
|
|
|
#include "gfxASurface.h"
|
|
|
|
#include "nsPoint.h"
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2010-09-30 22:53:42 +00:00
|
|
|
struct ID3D10Texture2D;
|
2013-09-07 02:15:49 +00:00
|
|
|
struct nsIntRect;
|
2010-09-30 22:53:42 +00:00
|
|
|
|
2013-05-29 21:59:24 +00:00
|
|
|
class gfxD2DSurface : public gfxASurface {
|
2010-02-26 06:36:07 +00:00
|
|
|
public:
|
|
|
|
|
2010-06-09 15:50:03 +00:00
|
|
|
gfxD2DSurface(HWND wnd,
|
|
|
|
gfxContentType aContent);
|
2010-02-26 06:36:07 +00:00
|
|
|
|
|
|
|
gfxD2DSurface(const gfxIntSize& size,
|
2014-01-23 18:26:40 +00:00
|
|
|
gfxImageFormat imageFormat = gfxImageFormat::RGB24);
|
2010-02-26 06:36:07 +00:00
|
|
|
|
2010-08-11 00:36:03 +00:00
|
|
|
gfxD2DSurface(HANDLE handle, gfxContentType aContent);
|
2010-02-26 06:36:07 +00:00
|
|
|
|
2010-09-30 22:53:42 +00:00
|
|
|
gfxD2DSurface(ID3D10Texture2D *texture, gfxContentType aContent);
|
|
|
|
|
2010-02-26 06:36:07 +00:00
|
|
|
gfxD2DSurface(cairo_surface_t *csurf);
|
|
|
|
|
|
|
|
virtual ~gfxD2DSurface();
|
|
|
|
|
|
|
|
void Present();
|
|
|
|
void Scroll(const nsIntPoint &aDelta, const nsIntRect &aClip);
|
|
|
|
|
2011-11-18 04:00:37 +00:00
|
|
|
virtual const gfxIntSize GetSize() const;
|
|
|
|
|
2011-06-24 17:41:18 +00:00
|
|
|
ID3D10Texture2D *GetTexture();
|
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
HDC GetDC(bool aRetainContents);
|
2010-06-22 01:10:34 +00:00
|
|
|
void ReleaseDC(const nsIntRect *aUpdatedRect);
|
2010-02-26 06:36:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* GFX_D2DSURFACE_H */
|