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 "nsRect.h"
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2010-09-30 22:53:42 +00:00
|
|
|
struct ID3D10Texture2D;
|
|
|
|
|
2010-02-26 06:36:07 +00:00
|
|
|
class THEBES_API gfxD2DSurface : public gfxASurface {
|
|
|
|
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,
|
|
|
|
gfxImageFormat imageFormat = ImageFormatRGB24);
|
|
|
|
|
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);
|
|
|
|
|
2011-05-08 01:19:11 +00:00
|
|
|
void MovePixels(const nsIntRect& aSourceRect,
|
|
|
|
const nsIntPoint& aDestTopLeft)
|
|
|
|
{
|
|
|
|
FastMovePixels(aSourceRect, aDestTopLeft);
|
|
|
|
}
|
|
|
|
|
2010-02-26 06:36:07 +00:00
|
|
|
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 */
|