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