gfx/thebes/gfxD2DSurface.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
michael@0 2 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef GFX_D2DSURFACE_H
michael@0 7 #define GFX_D2DSURFACE_H
michael@0 8
michael@0 9 #include "gfxASurface.h"
michael@0 10 #include "nsPoint.h"
michael@0 11
michael@0 12 #include <windows.h>
michael@0 13
michael@0 14 struct ID3D10Texture2D;
michael@0 15 struct nsIntRect;
michael@0 16
michael@0 17 class gfxD2DSurface : public gfxASurface {
michael@0 18 public:
michael@0 19
michael@0 20 gfxD2DSurface(HWND wnd,
michael@0 21 gfxContentType aContent);
michael@0 22
michael@0 23 gfxD2DSurface(const gfxIntSize& size,
michael@0 24 gfxImageFormat imageFormat = gfxImageFormat::RGB24);
michael@0 25
michael@0 26 gfxD2DSurface(HANDLE handle, gfxContentType aContent);
michael@0 27
michael@0 28 gfxD2DSurface(ID3D10Texture2D *texture, gfxContentType aContent);
michael@0 29
michael@0 30 gfxD2DSurface(cairo_surface_t *csurf);
michael@0 31
michael@0 32 void MovePixels(const nsIntRect& aSourceRect,
michael@0 33 const nsIntPoint& aDestTopLeft)
michael@0 34 {
michael@0 35 FastMovePixels(aSourceRect, aDestTopLeft);
michael@0 36 }
michael@0 37
michael@0 38 virtual ~gfxD2DSurface();
michael@0 39
michael@0 40 void Present();
michael@0 41 void Scroll(const nsIntPoint &aDelta, const nsIntRect &aClip);
michael@0 42
michael@0 43 virtual const gfxIntSize GetSize() const;
michael@0 44
michael@0 45 ID3D10Texture2D *GetTexture();
michael@0 46
michael@0 47 HDC GetDC(bool aRetainContents);
michael@0 48 void ReleaseDC(const nsIntRect *aUpdatedRect);
michael@0 49 };
michael@0 50
michael@0 51 #endif /* GFX_D2DSURFACE_H */

mercurial