Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[embedlite] Add GetCompositorBridgeParent helper to the nsWindow. JB#…
…49551
  • Loading branch information
rainemak committed Apr 17, 2020
1 parent ca68862 commit 7293032
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions embedding/embedlite/embedshared/nsWindow.cpp
Expand Up @@ -26,6 +26,7 @@
#include "mozilla/Hal.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/ImageBridgeChild.h"
#include "mozilla/layers/CompositorSession.h"
#include "mozilla/ipc/MessageChannel.h"

using namespace mozilla::gl;
Expand Down Expand Up @@ -356,6 +357,12 @@ const char *nsWindow::Type() const
return "nsWindow";
}

CompositorBridgeParent *
nsWindow::GetCompositorBridgeParent() const
{
return mCompositorSession ? mCompositorSession->GetInProcessBridge() : nullptr;
}

// Private
nsWindow::nsWindow()
{
Expand Down
2 changes: 2 additions & 0 deletions embedding/embedlite/embedshared/nsWindow.h
Expand Up @@ -96,6 +96,8 @@ class nsWindow : public PuppetWidgetBase

const char *Type() const override;

CompositorBridgeParent* GetCompositorBridgeParent() const;

private:
nsWindow();
mozilla::gl::GLContext* GetGLContext() const;
Expand Down

0 comments on commit 7293032

Please sign in to comment.