1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- 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_GTK_WINDOW_SURFACE_XRENDER_H 8 #define _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_XRENDER_H 9 10 #ifdef MOZ_X11 11 12 # include "WindowSurfaceX11.h" 13 # include "gfxXlibSurface.h" 14 15 namespace mozilla { 16 namespace widget { 17 18 class WindowSurfaceXRender : public WindowSurfaceX11 { 19 public: 20 WindowSurfaceXRender(Display* aDisplay, Window aWindow, Visual* aVisual, 21 unsigned int aDepth); 22 ~WindowSurfaceXRender(); 23 24 already_AddRefed<gfx::DrawTarget> Lock( 25 const LayoutDeviceIntRegion& aRegion) override; 26 void Commit(const LayoutDeviceIntRegion& aInvalidRegion) override; 27 28 private: 29 RefPtr<gfxXlibSurface> mXlibSurface; 30 GC mGC; 31 }; 32 33 } // namespace widget 34 } // namespace mozilla 35 36 #endif // MOZ_X11 37 #endif // _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_XRENDER_H 38