Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=99: */
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_
8 :
9 : #include "CompositorSession.h"
10 : #include "mozilla/gfx/Point.h"
11 : #include "Units.h"
12 :
13 : namespace mozilla {
14 : namespace layers {
15 :
16 : class CompositorOptions;
17 :
18 : // A CompositorSession where both the child and parent CompositorBridge reside
19 : // in the same process.
20 0 : class InProcessCompositorSession final : public CompositorSession
21 : {
22 : public:
23 : static RefPtr<InProcessCompositorSession> Create(
24 : nsBaseWidget* baseWidget,
25 : LayerManager* aLayerManager,
26 : const uint64_t& aRootLayerTreeId,
27 : CSSToLayoutDeviceScale aScale,
28 : const CompositorOptions& aOptions,
29 : bool aUseExternalSurfaceSize,
30 : const gfx::IntSize& aSurfaceSize,
31 : uint32_t aNamespace);
32 :
33 : CompositorBridgeParent* GetInProcessBridge() const override;
34 : void SetContentController(GeckoContentController* aController) override;
35 : nsIWidget* GetWidget() const;
36 : RefPtr<IAPZCTreeManager> GetAPZCTreeManager() const override;
37 : void Shutdown() override;
38 :
39 : void NotifySessionLost();
40 :
41 : private:
42 : InProcessCompositorSession(widget::CompositorWidget* aWidget,
43 : nsBaseWidget* baseWidget,
44 : CompositorBridgeChild* aChild,
45 : CompositorBridgeParent* aParent);
46 :
47 : private:
48 : nsBaseWidget* mWidget;
49 : RefPtr<CompositorBridgeParent> mCompositorBridgeParent;
50 : RefPtr<CompositorWidget> mCompositorWidget;
51 : };
52 :
53 : } // namespace layers
54 : } // namespace mozilla
55 :
56 : #endif // _include_mozilla_gfx_ipc_InProcessCompositorSession_h_
|