Bug 1492664 - update references in docs; r=froydnj
[gecko.git] / widget / InProcessCompositorWidget.h
blob6ab27e24cb721661d55ccfa7b1bfd585ad093919
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 {
16 public:
17 explicit InProcessCompositorWidget(const layers::CompositorOptions& aOptions,
18 nsBaseWidget* aWidget);
20 virtual bool PreRender(WidgetRenderingContext* aManager) override;
21 virtual void PostRender(WidgetRenderingContext* aManager) override;
22 virtual void DrawWindowUnderlay(WidgetRenderingContext* aContext,
23 LayoutDeviceIntRect aRect) override;
24 virtual void DrawWindowOverlay(WidgetRenderingContext* aContext,
25 LayoutDeviceIntRect aRect) override;
26 virtual already_AddRefed<gfx::DrawTarget> StartRemoteDrawing() override;
27 virtual already_AddRefed<gfx::DrawTarget> StartRemoteDrawingInRegion(
28 LayoutDeviceIntRegion& aInvalidRegion,
29 layers::BufferMode* aBufferMode) override;
30 virtual void EndRemoteDrawing() override;
31 virtual void EndRemoteDrawingInRegion(
32 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