Bug 1869647 - Mark hasStorageAccess.sub.https.window.html as intermittent after wpt...
[gecko.git] / widget / gtk / WindowSurfaceX11Image.h
blob281199b5dd5797c065286405ec9b47750beab5e6
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
10 #ifdef MOZ_X11
12 # include <glib.h>
13 # include "WindowSurfaceX11.h"
14 # include "gfxXlibSurface.h"
15 # include "gfxImageSurface.h"
17 namespace mozilla {
18 namespace widget {
20 class WindowSurfaceX11Image : public WindowSurfaceX11 {
21 public:
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; }
31 private:
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;
41 bool mIsShaped;
42 Window mWindowParent;
45 } // namespace widget
46 } // namespace mozilla
48 #endif // MOZ_X11
49 #endif // _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_X11_IMAGE_H