2010-02-25 22:36:07 -08:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
2012-05-21 04:12:37 -07: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-25 22:36:07 -08:00
|
|
|
|
|
|
|
#ifndef GFX_D2DSURFACE_H
|
|
|
|
#define GFX_D2DSURFACE_H
|
|
|
|
|
|
|
|
#include "gfxASurface.h"
|
|
|
|
#include "nsPoint.h"
|
|
|
|
#include "nsRect.h"
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2010-09-30 15:53:42 -07:00
|
|
|
struct ID3D10Texture2D;
|
|
|
|
|
2013-05-29 14:59:24 -07:00
|
|
|
class gfxD2DSurface : public gfxASurface {
|
2010-02-25 22:36:07 -08:00
|
|
|
public:
|
|
|
|
|
2010-06-09 08:50:03 -07:00
|
|
|
gfxD2DSurface(HWND wnd,
|
|
|
|
gfxContentType aContent);
|
2010-02-25 22:36:07 -08:00
|
|
|
|
|
|
|
gfxD2DSurface(const gfxIntSize& size,
|
|
|
|
gfxImageFormat imageFormat = ImageFormatRGB24);
|
|
|
|
|
2010-08-10 17:36:03 -07:00
|
|
|
gfxD2DSurface(HANDLE handle, gfxContentType aContent);
|
2010-02-25 22:36:07 -08:00
|
|
|
|
2010-09-30 15:53:42 -07:00
|
|
|
gfxD2DSurface(ID3D10Texture2D *texture, gfxContentType aContent);
|
|
|
|
|
2010-02-25 22:36:07 -08:00
|
|
|
gfxD2DSurface(cairo_surface_t *csurf);
|
|
|
|
|
2011-05-07 18:19:11 -07:00
|
|
|
void MovePixels(const nsIntRect& aSourceRect,
|
|
|
|
const nsIntPoint& aDestTopLeft)
|
|
|
|
{
|
|
|
|
FastMovePixels(aSourceRect, aDestTopLeft);
|
|
|
|
}
|
|
|
|
|
2010-02-25 22:36:07 -08:00
|
|
|
virtual ~gfxD2DSurface();
|
|
|
|
|
|
|
|
void Present();
|
|
|
|
void Scroll(const nsIntPoint &aDelta, const nsIntRect &aClip);
|
|
|
|
|
2011-11-17 20:00:37 -08:00
|
|
|
virtual const gfxIntSize GetSize() const;
|
|
|
|
|
2011-06-24 10:41:18 -07:00
|
|
|
ID3D10Texture2D *GetTexture();
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
HDC GetDC(bool aRetainContents);
|
2010-06-21 18:10:34 -07:00
|
|
|
void ReleaseDC(const nsIntRect *aUpdatedRect);
|
2010-02-25 22:36:07 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* GFX_D2DSURFACE_H */
|