Bug 1890689 accumulate input in LargerReceiverBlockSizeThanDesiredBuffering GTest...
[gecko.git] / gfx / ipc / InProcessCompositorSession.h
blobe9a346253a476334031ddc8d1ab72e4552b5cc61
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 _include_mozilla_gfx_ipc_InProcessCompositorSession_h_
7 #define _include_mozilla_gfx_ipc_InProcessCompositorSession_h_
9 #include "CompositorSession.h"
10 #include "mozilla/gfx/Point.h"
11 #include "Units.h"
13 class nsIWidget;
15 namespace mozilla {
16 namespace layers {
18 class CompositorOptions;
19 class WebRenderLayerManager;
21 // A CompositorSession where both the child and parent CompositorBridge reside
22 // in the same process.
23 class InProcessCompositorSession final : public CompositorSession {
24 public:
25 static RefPtr<InProcessCompositorSession> Create(
26 nsBaseWidget* baseWidget, WebRenderLayerManager* aLayerManager,
27 const LayersId& aRootLayerTreeId, CSSToLayoutDeviceScale aScale,
28 const CompositorOptions& aOptions, bool aUseExternalSurfaceSize,
29 const gfx::IntSize& aSurfaceSize, uint32_t aNamespace,
30 uint64_t aInnerWindowId);
32 CompositorBridgeParent* GetInProcessBridge() const override;
33 void SetContentController(GeckoContentController* aController) override;
34 nsIWidget* GetWidget() const;
35 RefPtr<IAPZCTreeManager> GetAPZCTreeManager() const override;
36 void Shutdown() override;
38 void NotifySessionLost();
40 private:
41 InProcessCompositorSession(nsBaseWidget* aWidget,
42 widget::CompositorWidget* aCompositorWidget,
43 CompositorBridgeChild* aChild,
44 CompositorBridgeParent* aParent);
46 private:
47 RefPtr<CompositorBridgeParent> mCompositorBridgeParent;
48 RefPtr<CompositorWidget> mCompositorWidget;
51 } // namespace layers
52 } // namespace mozilla
54 #endif // _include_mozilla_gfx_ipc_InProcessCompositorSession_h_