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"
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
{
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();
41 InProcessCompositorSession(nsBaseWidget
* aWidget
,
42 widget::CompositorWidget
* aCompositorWidget
,
43 CompositorBridgeChild
* aChild
,
44 CompositorBridgeParent
* aParent
);
47 RefPtr
<CompositorBridgeParent
> mCompositorBridgeParent
;
48 RefPtr
<CompositorWidget
> mCompositorWidget
;
52 } // namespace mozilla
54 #endif // _include_mozilla_gfx_ipc_InProcessCompositorSession_h_