From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- widget/InProcessCompositorWidget.h | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 widget/InProcessCompositorWidget.h (limited to 'widget/InProcessCompositorWidget.h') diff --git a/widget/InProcessCompositorWidget.h b/widget/InProcessCompositorWidget.h new file mode 100644 index 000000000..ae9e51b3b --- /dev/null +++ b/widget/InProcessCompositorWidget.h @@ -0,0 +1,52 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_widget_InProcessCompositorWidget_h__ +#define mozilla_widget_InProcessCompositorWidget_h__ + +#include "CompositorWidget.h" + +namespace mozilla { +namespace widget { + +// This version of CompositorWidget implements a wrapper around +// nsBaseWidget. +class InProcessCompositorWidget : public CompositorWidget +{ +public: + explicit InProcessCompositorWidget(nsBaseWidget* aWidget); + + virtual bool PreRender(WidgetRenderingContext* aManager) override; + virtual void PostRender(WidgetRenderingContext* aManager) override; + virtual void DrawWindowUnderlay(WidgetRenderingContext* aContext, + LayoutDeviceIntRect aRect) override; + virtual void DrawWindowOverlay(WidgetRenderingContext* aContext, + LayoutDeviceIntRect aRect) override; + virtual already_AddRefed StartRemoteDrawing() override; + virtual already_AddRefed + StartRemoteDrawingInRegion(LayoutDeviceIntRegion& aInvalidRegion, + layers::BufferMode* aBufferMode) override; + virtual void EndRemoteDrawing() override; + virtual void EndRemoteDrawingInRegion(gfx::DrawTarget* aDrawTarget, + LayoutDeviceIntRegion& aInvalidRegion) override; + virtual void CleanupRemoteDrawing() override; + virtual void CleanupWindowEffects() override; + virtual bool InitCompositor(layers::Compositor* aCompositor) override; + virtual LayoutDeviceIntSize GetClientSize() override; + virtual uint32_t GetGLFrameBufferFormat() override; + virtual layers::Composer2D* GetComposer2D() override; + virtual void ObserveVsync(VsyncObserver* aObserver) override; + virtual uintptr_t GetWidgetKey() override; + + // If you can override this method, inherit from CompositorWidget instead. + nsIWidget* RealWidget() override; + +private: + nsBaseWidget* mWidget; +}; + +} // namespace widget +} // namespace mozilla + +#endif -- cgit v1.2.3