tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

InProcessCompositorSession.h (1964B)


      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_
      8 
      9 #include "CompositorSession.h"
     10 #include "mozilla/gfx/Point.h"
     11 #include "Units.h"
     12 
     13 class nsIWidget;
     14 
     15 namespace mozilla {
     16 namespace layers {
     17 
     18 class CompositorOptions;
     19 class WebRenderLayerManager;
     20 
     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      nsIWidget* 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);
     31 
     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;
     37 
     38  void NotifySessionLost();
     39 
     40 private:
     41  InProcessCompositorSession(nsIWidget* aWidget,
     42                             widget::CompositorWidget* aCompositorWidget,
     43                             CompositorBridgeChild* aChild,
     44                             CompositorBridgeParent* aParent);
     45 
     46 private:
     47  RefPtr<CompositorBridgeParent> mCompositorBridgeParent;
     48  RefPtr<CompositorWidget> mCompositorWidget;
     49 };
     50 
     51 }  // namespace layers
     52 }  // namespace mozilla
     53 
     54 #endif  // _include_mozilla_gfx_ipc_InProcessCompositorSession_h_