WindowSurfaceX11SHM.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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. #ifndef _MOZILLA_WIDGET_WINDOW_SURFACE_X11_SHM_H
  7. #define _MOZILLA_WIDGET_WINDOW_SURFACE_X11_SHM_H
  8. #ifdef MOZ_X11
  9. #include "mozilla/widget/WindowSurface.h"
  10. #include "nsShmImage.h"
  11. namespace mozilla {
  12. namespace widget {
  13. class WindowSurfaceX11SHM : public WindowSurface {
  14. public:
  15. WindowSurfaceX11SHM(Display* aDisplay, Drawable aWindow, Visual* aVisual,
  16. unsigned int aDepth);
  17. already_AddRefed<gfx::DrawTarget> Lock(const LayoutDeviceIntRegion& aRegion) override;
  18. void Commit(const LayoutDeviceIntRegion& aInvalidRegion) override;
  19. private:
  20. RefPtr<nsShmImage> mFrontImage;
  21. RefPtr<nsShmImage> mBackImage;
  22. };
  23. } // namespace widget
  24. } // namespace mozilla
  25. #endif // MOZ_X11
  26. #endif // _MOZILLA_WIDGET_WINDOW_SURFACE_X11_SHM_H