Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
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/. */
6 :
7 : #ifndef _MOZILLA_WIDGET_WINDOW_SURFACE_X11_SHM_H
8 : #define _MOZILLA_WIDGET_WINDOW_SURFACE_X11_SHM_H
9 :
10 : #ifdef MOZ_X11
11 :
12 : #include "mozilla/widget/WindowSurface.h"
13 : #include "nsShmImage.h"
14 :
15 : namespace mozilla {
16 : namespace widget {
17 :
18 0 : class WindowSurfaceX11SHM : public WindowSurface {
19 : public:
20 : WindowSurfaceX11SHM(Display* aDisplay, Drawable aWindow, Visual* aVisual,
21 : unsigned int aDepth);
22 :
23 : already_AddRefed<gfx::DrawTarget> Lock(const LayoutDeviceIntRegion& aRegion) override;
24 : void Commit(const LayoutDeviceIntRegion& aInvalidRegion) override;
25 :
26 : private:
27 : RefPtr<nsShmImage> mFrontImage;
28 : RefPtr<nsShmImage> mBackImage;
29 : };
30 :
31 : } // namespace widget
32 : } // namespace mozilla
33 :
34 : #endif // MOZ_X11
35 : #endif // _MOZILLA_WIDGET_WINDOW_SURFACE_X11_SHM_H
|