2016-07-18 07:24:27 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=99: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef _include_mozilla_gfx_ipc_InProcessCompositorSession_h_
|
|
|
|
#define _include_mozilla_gfx_ipc_InProcessCompositorSession_h_
|
|
|
|
|
|
|
|
#include "CompositorSession.h"
|
|
|
|
#include "mozilla/gfx/Point.h"
|
|
|
|
#include "Units.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
2017-01-13 01:29:41 +03:00
|
|
|
class CompositorOptions;
|
|
|
|
|
2016-07-18 07:24:27 +03:00
|
|
|
// A CompositorSession where both the child and parent CompositorBridge reside
|
|
|
|
// in the same process.
|
|
|
|
class InProcessCompositorSession final : public CompositorSession
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static RefPtr<InProcessCompositorSession> Create(
|
2017-06-15 21:34:00 +03:00
|
|
|
nsBaseWidget* baseWidget,
|
2016-11-08 18:42:19 +03:00
|
|
|
LayerManager* aLayerManager,
|
2016-07-18 07:24:27 +03:00
|
|
|
const uint64_t& aRootLayerTreeId,
|
2016-07-18 07:24:27 +03:00
|
|
|
CSSToLayoutDeviceScale aScale,
|
2017-01-13 01:29:41 +03:00
|
|
|
const CompositorOptions& aOptions,
|
2016-07-18 07:24:27 +03:00
|
|
|
bool aUseExternalSurfaceSize,
|
2017-04-14 11:06:09 +03:00
|
|
|
const gfx::IntSize& aSurfaceSize,
|
|
|
|
uint32_t aNamespace);
|
2016-07-18 07:24:27 +03:00
|
|
|
|
|
|
|
CompositorBridgeParent* GetInProcessBridge() const override;
|
|
|
|
void SetContentController(GeckoContentController* aController) override;
|
2017-06-15 21:34:00 +03:00
|
|
|
nsIWidget* GetWidget() const;
|
2016-08-29 16:18:00 +03:00
|
|
|
RefPtr<IAPZCTreeManager> GetAPZCTreeManager() const override;
|
2016-07-18 07:24:27 +03:00
|
|
|
void Shutdown() override;
|
|
|
|
|
2017-06-15 21:34:00 +03:00
|
|
|
void NotifySessionLost();
|
|
|
|
|
2016-07-18 07:24:27 +03:00
|
|
|
private:
|
|
|
|
InProcessCompositorSession(widget::CompositorWidget* aWidget,
|
2017-06-15 21:34:00 +03:00
|
|
|
nsBaseWidget* baseWidget,
|
2016-07-18 07:24:27 +03:00
|
|
|
CompositorBridgeChild* aChild,
|
|
|
|
CompositorBridgeParent* aParent);
|
|
|
|
|
|
|
|
private:
|
2017-06-15 21:34:00 +03:00
|
|
|
nsBaseWidget* mWidget;
|
2016-07-18 07:24:27 +03:00
|
|
|
RefPtr<CompositorBridgeParent> mCompositorBridgeParent;
|
|
|
|
RefPtr<CompositorWidget> mCompositorWidget;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // _include_mozilla_gfx_ipc_InProcessCompositorSession_h_
|