1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_X11_IMAGE_H
8 #define _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_X11_IMAGE_H
13 # include "WindowSurfaceX11.h"
14 # include "gfxXlibSurface.h"
15 # include "gfxImageSurface.h"
20 class WindowSurfaceX11Image
: public WindowSurfaceX11
{
22 WindowSurfaceX11Image(Display
* aDisplay
, Window aWindow
, Visual
* aVisual
,
23 unsigned int aDepth
, bool aIsShaped
);
24 ~WindowSurfaceX11Image();
26 already_AddRefed
<gfx::DrawTarget
> Lock(
27 const LayoutDeviceIntRegion
& aRegion
) override
;
28 void Commit(const LayoutDeviceIntRegion
& aInvalidRegion
) override
;
29 bool IsFallback() const override
{ return true; }
32 void ResizeTransparencyBitmap(int aWidth
, int aHeight
);
33 void ApplyTransparencyBitmap();
35 RefPtr
<gfxXlibSurface
> mWindowSurface
;
36 RefPtr
<gfxImageSurface
> mImageSurface
;
38 gchar
* mTransparencyBitmap
;
39 int32_t mTransparencyBitmapWidth
;
40 int32_t mTransparencyBitmapHeight
;
45 } // namespace mozilla
48 #endif // _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_X11_IMAGE_H