Bug 1454293 [wpt PR 10484] - null is not the correct origin for createDocument()...
[gecko.git] / widget / InProcessCompositorWidget.h
blob95ca9ef2031e04e38814fd2a9b400d4fae82c3a4
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_widget_InProcessCompositorWidget_h__
6 #define mozilla_widget_InProcessCompositorWidget_h__
8 #include "CompositorWidget.h"
10 namespace mozilla {
11 namespace widget {
13 // This version of CompositorWidget implements a wrapper around
14 // nsBaseWidget.
15 class InProcessCompositorWidget : public CompositorWidget
17 public:
18 explicit InProcessCompositorWidget(const layers::CompositorOptions& aOptions,
19 nsBaseWidget* aWidget);
21 virtual bool PreRender(WidgetRenderingContext* aManager) override;
22 virtual void PostRender(WidgetRenderingContext* aManager) override;
23 virtual void DrawWindowUnderlay(WidgetRenderingContext* aContext,
24 LayoutDeviceIntRect aRect) override;
25 virtual void DrawWindowOverlay(WidgetRenderingContext* aContext,
26 LayoutDeviceIntRect aRect) override;
27 virtual already_AddRefed<gfx::DrawTarget> StartRemoteDrawing() override;
28 virtual already_AddRefed<gfx::DrawTarget>
29 StartRemoteDrawingInRegion(LayoutDeviceIntRegion& aInvalidRegion,
30 layers::BufferMode* aBufferMode) override;
31 virtual void EndRemoteDrawing() override;
32 virtual void EndRemoteDrawingInRegion(gfx::DrawTarget* aDrawTarget,
33 LayoutDeviceIntRegion& aInvalidRegion) override;
34 virtual void CleanupRemoteDrawing() override;
35 virtual void CleanupWindowEffects() override;
36 virtual bool InitCompositor(layers::Compositor* aCompositor) override;
37 virtual LayoutDeviceIntSize GetClientSize() override;
38 virtual uint32_t GetGLFrameBufferFormat() override;
39 virtual void ObserveVsync(VsyncObserver* aObserver) override;
40 virtual uintptr_t GetWidgetKey() override;
42 // If you can override this method, inherit from CompositorWidget instead.
43 nsIWidget* RealWidget() override;
45 protected:
46 nsBaseWidget* mWidget;
49 } // namespace widget
50 } // namespace mozilla
52 #endif