Bug 1350638 - Remove sync GetCompositorOptions call in TabChild::InitRenderingState. r=dvander

The goal of this patch is to remove the call to the sync IPC
GetCompositorOptions message from TabChild::InitRenderingState. In order
to this, we have InitRenderingState take the CompositorOptions as an
argument instead, and propagate that backwards through the call sites.
Eventually we can propagate it back to a set of already-sync IPC
messages in PCompositorBridge that are used during layers id
registration (NotifyChildCreated, NotifyChildRecreated, etc.). Therefore
this patch effectively piggybacks the CompositorOptions sync IPC onto
these pre-existing sync IPC messages.

The one exception is when we propagate it back to the AdoptChild call.
If this message were sync we could just use it like the others and have
it return a CompositorOptions. However, it is async, so instead we add
another call to GetCompositorOptions here temporarily. This will be
removed in the next patch.

MozReview-Commit-ID: AtdYOuXmHu4

--HG--
extra : rebase_source : 5b80831cf84d3a4b57b2214a12ccf8a896cfa3a7
This commit is contained in:
Kartikaya Gupta 2017-04-09 17:30:27 -04:00
Родитель e1a015ae5c
Коммит 1bfa62105b
20 изменённых файлов: 91 добавлений и 41 удалений

Просмотреть файл

@ -813,6 +813,7 @@ ContentChild::ProvideWindowCommon(TabChild* aTabOpener,
PRenderFrameChild* renderFrame = newChild->SendPRenderFrameConstructor();
TextureFactoryIdentifier textureFactoryIdentifier;
uint64_t layersId = 0;
CompositorOptions compositorOptions;
if (aIframeMoz) {
MOZ_ASSERT(aTabOpener);
@ -829,7 +830,7 @@ ContentChild::ProvideWindowCommon(TabChild* aTabOpener,
newChild->SendBrowserFrameOpenWindow(aTabOpener, renderFrame, NS_ConvertUTF8toUTF16(url),
name, NS_ConvertUTF8toUTF16(features),
aWindowIsNew, &textureFactoryIdentifier,
&layersId);
&layersId, &compositorOptions);
} else {
nsAutoCString baseURIString;
float fullZoom;
@ -852,7 +853,8 @@ ContentChild::ProvideWindowCommon(TabChild* aTabOpener,
&frameScripts,
&urlToLoad,
&textureFactoryIdentifier,
&layersId)) {
&layersId,
&compositorOptions)) {
PRenderFrameChild::Send__delete__(renderFrame);
return NS_ERROR_NOT_AVAILABLE;
}
@ -896,8 +898,8 @@ ContentChild::ProvideWindowCommon(TabChild* aTabOpener,
// Unfortunately we don't get a window unless we've shown the frame. That's
// pretty bogus; see bug 763602.
newChild->DoFakeShow(textureFactoryIdentifier, layersId, renderFrame,
showInfo);
newChild->DoFakeShow(textureFactoryIdentifier, layersId, compositorOptions,
renderFrame, showInfo);
for (size_t i = 0; i < frameScripts.Length(); i++) {
FrameScriptInfo& info = frameScripts[i];

Просмотреть файл

@ -4594,7 +4594,8 @@ ContentParent::RecvCreateWindow(PBrowserParent* aThisTab,
InfallibleTArray<FrameScriptInfo>* aFrameScripts,
nsCString* aURLToLoad,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId)
uint64_t* aLayersId,
CompositorOptions* aCompositorOptions)
{
// We always expect to open a new window here. If we don't, it's an error.
*aWindowIsNew = true;
@ -4640,6 +4641,7 @@ ContentParent::RecvCreateWindow(PBrowserParent* aThisTab,
!newTab->GetRenderFrameInfo(aTextureFactoryIdentifier, aLayersId)) {
*aResult = NS_ERROR_FAILURE;
}
*aCompositorOptions = rfp->GetCompositorOptions();
return IPC_OK();
}

Просмотреть файл

@ -554,7 +554,8 @@ public:
InfallibleTArray<FrameScriptInfo>* aFrameScripts,
nsCString* aURLToLoad,
layers::TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId) override;
uint64_t* aLayersId,
mozilla::layers::CompositorOptions* aCompositorOptions) override;
virtual mozilla::ipc::IPCResult RecvCreateWindowInDifferentProcess(
PBrowserParent* aThisTab,

Просмотреть файл

@ -62,6 +62,7 @@ using class mozilla::WidgetPluginEvent from "ipc/nsGUIEventIPC.h";
using struct mozilla::dom::RemoteDOMEvent from "mozilla/dom/TabMessageUtils.h";
using mozilla::dom::ScreenOrientationInternal from "mozilla/dom/ScreenOrientation.h";
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.h";
using mozilla::CSSToScreenScale from "Units.h";
using mozilla::CommandInt from "mozilla/EventForwards.h";
using mozilla::WritingMode from "mozilla/WritingModes.h";
@ -473,7 +474,8 @@ parent:
nsString aURL, nsString aName, nsString aFeatures)
returns (bool windowOpened,
TextureFactoryIdentifier textureFactoryIdentifier,
uint64_t layersId);
uint64_t layersId,
CompositorOptions compositorOptions);
/**
* Tells the containing widget whether the given input block results in a
@ -630,6 +632,7 @@ child:
async InitRendering(TextureFactoryIdentifier textureFactoryIdentifier,
uint64_t layersId,
CompositorOptions compositorOptions,
bool layersConnected,
nullable PRenderFrame renderFrame);

Просмотреть файл

@ -87,6 +87,7 @@ using class mozilla::dom::ipc::StructuredCloneData from "mozilla/dom/ipc/Structu
using mozilla::DataStorageType from "ipc/DataStorageIPCUtils.h";
using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.h";
using struct mozilla::dom::FlyWebPublishOptions from "mozilla/dom/FlyWebPublishOptionsIPCSerializer.h";
using mozilla::Telemetry::Accumulation from "mozilla/TelemetryComms.h";
using mozilla::Telemetry::KeyedAccumulation from "mozilla/TelemetryComms.h";
@ -1000,7 +1001,8 @@ parent:
FrameScriptInfo[] frameScripts,
nsCString urlToLoad,
TextureFactoryIdentifier textureFactoryIdentifier,
uint64_t layersId);
uint64_t layersId,
CompositorOptions compositorOptions);
async CreateWindowInDifferentProcess(
PBrowser aThisTab,

Просмотреть файл

@ -1174,9 +1174,10 @@ TabChild::RecvLoadURL(const nsCString& aURI,
void
TabChild::DoFakeShow(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
const uint64_t& aLayersId,
const CompositorOptions& aCompositorOptions,
PRenderFrameChild* aRenderFrame, const ShowInfo& aShowInfo)
{
InitRenderingState(aTextureFactoryIdentifier, aLayersId, aRenderFrame);
InitRenderingState(aTextureFactoryIdentifier, aLayersId, aCompositorOptions, aRenderFrame);
RecvShow(ScreenIntSize(0, 0), aShowInfo, mParentIsActive, nsSizeMode_Normal);
mDidFakeShow = true;
}
@ -1262,13 +1263,14 @@ TabChild::RecvShow(const ScreenIntSize& aSize,
mozilla::ipc::IPCResult
TabChild::RecvInitRendering(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
const uint64_t& aLayersId,
const CompositorOptions& aCompositorOptions,
const bool& aLayersConnected,
PRenderFrameChild* aRenderFrame)
{
MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame));
mLayersConnected = aLayersConnected;
InitRenderingState(aTextureFactoryIdentifier, aLayersId, aRenderFrame);
InitRenderingState(aTextureFactoryIdentifier, aLayersId, aCompositorOptions, aRenderFrame);
return IPC_OK();
}
@ -2642,6 +2644,7 @@ TabChild::InitTabChildGlobal()
void
TabChild::InitRenderingState(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
const uint64_t& aLayersId,
const CompositorOptions& aCompositorOptions,
PRenderFrameChild* aRenderFrame)
{
mPuppetWidget->InitIMEState();
@ -2662,9 +2665,7 @@ TabChild::InitRenderingState(const TextureFactoryIdentifier& aTextureFactoryIden
return;
}
CompositorOptions options;
Unused << compositorChild->SendGetCompositorOptions(aLayersId, &options);
mCompositorOptions = Some(options);
mCompositorOptions = Some(aCompositorOptions);
mRemoteFrame = static_cast<RenderFrameChild*>(aRenderFrame);
if (aLayersId != 0) {

Просмотреть файл

@ -343,6 +343,7 @@ public:
virtual mozilla::ipc::IPCResult
RecvInitRendering(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
const uint64_t& aLayersId,
const mozilla::layers::CompositorOptions& aCompositorOptions,
const bool& aLayersConnected,
PRenderFrameChild* aRenderFrame) override;
@ -629,6 +630,7 @@ public:
// Call RecvShow(nsIntSize(0, 0)) and block future calls to RecvShow().
void DoFakeShow(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
const uint64_t& aLayersId,
const mozilla::layers::CompositorOptions& aCompositorOptions,
PRenderFrameChild* aRenderFrame,
const ShowInfo& aShowInfo);
@ -729,6 +731,7 @@ private:
void InitRenderingState(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
const uint64_t& aLayersId,
const mozilla::layers::CompositorOptions& aCompositorOptions,
PRenderFrameChild* aRenderFrame);
void InitAPZState();

Просмотреть файл

@ -644,6 +644,7 @@ TabParent::InitRenderFrame()
TextureFactoryIdentifier textureFactoryIdentifier;
renderFrame->GetTextureFactoryIdentifier(&textureFactoryIdentifier);
Unused << SendInitRendering(textureFactoryIdentifier, layersId,
renderFrame->GetCompositorOptions(),
renderFrame->IsLayersConnected(), renderFrame);
}
} else {
@ -2643,12 +2644,14 @@ TabParent::RecvBrowserFrameOpenWindow(PBrowserParent* aOpener,
const nsString& aFeatures,
bool* aOutWindowOpened,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId)
uint64_t* aLayersId,
CompositorOptions* aCompositorOptions)
{
BrowserElementParent::OpenWindowResult opened =
BrowserElementParent::OpenWindowOOP(TabParent::GetFrom(aOpener),
this, aRenderFrame, aURL, aName, aFeatures,
aTextureFactoryIdentifier, aLayersId);
*aCompositorOptions = static_cast<RenderFrameParent*>(aRenderFrame)->GetCompositorOptions();
*aOutWindowOpened = (opened == BrowserElementParent::OPEN_WINDOW_ADDED);
if (!*aOutWindowOpened) {
Destroy();

Просмотреть файл

@ -182,7 +182,8 @@ public:
const nsString& aFeatures,
bool* aOutWindowOpened,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId) override;
uint64_t* aLayersId,
CompositorOptions* aCompositorOptions) override;
virtual mozilla::ipc::IPCResult
RecvSyncMessage(const nsString& aMessage,

Просмотреть файл

@ -864,7 +864,8 @@ GPUProcessManager::AllocateLayerTreeId()
bool
GPUProcessManager::AllocateAndConnectLayerTreeId(PCompositorBridgeChild* aCompositorBridge,
base::ProcessId aOtherPid,
uint64_t* aOutLayersId)
uint64_t* aOutLayersId,
CompositorOptions* aOutCompositorOptions)
{
uint64_t layersId = AllocateLayerTreeId();
*aOutLayersId = layersId;
@ -878,12 +879,12 @@ GPUProcessManager::AllocateAndConnectLayerTreeId(PCompositorBridgeChild* aCompos
if (!aCompositorBridge) {
return false;
}
return aCompositorBridge->SendNotifyChildCreated(layersId);
return aCompositorBridge->SendNotifyChildCreated(layersId, aOutCompositorOptions);
}
// Use the combined message path.
LayerTreeOwnerTracker::Get()->Map(layersId, aOtherPid);
return aCompositorBridge->SendMapAndNotifyChildCreated(layersId, aOtherPid);
return aCompositorBridge->SendMapAndNotifyChildCreated(layersId, aOtherPid, aOutCompositorOptions);
}
void

Просмотреть файл

@ -127,7 +127,8 @@ public:
bool AllocateAndConnectLayerTreeId(
PCompositorBridgeChild* aCompositorBridge,
base::ProcessId aOtherPid,
uint64_t* aOutLayersId);
uint64_t* aOutLayersId,
CompositorOptions* aOutCompositorOptions);
void OnProcessLaunchComplete(GPUProcessHost* aHost) override;
void OnProcessUnexpectedShutdown(GPUProcessHost* aHost) override;

Просмотреть файл

@ -773,12 +773,13 @@ CompositorBridgeChild::SendResume()
}
bool
CompositorBridgeChild::SendNotifyChildCreated(const uint64_t& id)
CompositorBridgeChild::SendNotifyChildCreated(const uint64_t& id,
CompositorOptions* aOptions)
{
if (!mCanSend) {
return false;
}
return PCompositorBridgeChild::SendNotifyChildCreated(id);
return PCompositorBridgeChild::SendNotifyChildCreated(id, aOptions);
}
bool

Просмотреть файл

@ -153,7 +153,7 @@ public:
bool SendWillClose();
bool SendPause();
bool SendResume();
bool SendNotifyChildCreated(const uint64_t& id);
bool SendNotifyChildCreated(const uint64_t& id, CompositorOptions* aOptions);
bool SendAdoptChild(const uint64_t& id);
bool SendMakeSnapshot(const SurfaceDescriptor& inSnapshot, const gfx::IntRect& dirtyRect);
bool SendFlushRendering();

Просмотреть файл

@ -1144,8 +1144,14 @@ mozilla::ipc::IPCResult
CompositorBridgeParent::RecvGetCompositorOptions(const uint64_t& aLayersId,
CompositorOptions* aOptions)
{
// The main process should pass in 0 because we assume mRootLayerTreeID
MOZ_ASSERT(aLayersId == 0);
// The CompositorBridgeParent associated with the layers id should be this
// one.
if (aLayersId != 0) {
#ifdef DEBUG
MonitorAutoLock lock(*sIndirectLayerTreesLock);
MOZ_ASSERT(sIndirectLayerTrees[aLayersId].mParent == this);
#endif
}
*aOptions = mOptions;
return IPC_OK();
}
@ -1529,15 +1535,18 @@ CompositorBridgeParent::NotifyVsync(const TimeStamp& aTimeStamp, const uint64_t&
}
mozilla::ipc::IPCResult
CompositorBridgeParent::RecvNotifyChildCreated(const uint64_t& child)
CompositorBridgeParent::RecvNotifyChildCreated(const uint64_t& child,
CompositorOptions* aOptions)
{
MonitorAutoLock lock(*sIndirectLayerTreesLock);
NotifyChildCreated(child);
*aOptions = mOptions;
return IPC_OK();
}
mozilla::ipc::IPCResult
CompositorBridgeParent::RecvNotifyChildRecreated(const uint64_t& aChild)
CompositorBridgeParent::RecvNotifyChildRecreated(const uint64_t& aChild,
CompositorOptions* aOptions)
{
MonitorAutoLock lock(*sIndirectLayerTreesLock);
@ -1547,6 +1556,7 @@ CompositorBridgeParent::RecvNotifyChildRecreated(const uint64_t& aChild)
}
NotifyChildCreated(aChild);
*aOptions = mOptions;
return IPC_OK();
}
@ -1559,7 +1569,9 @@ CompositorBridgeParent::NotifyChildCreated(uint64_t aChild)
}
mozilla::ipc::IPCResult
CompositorBridgeParent::RecvMapAndNotifyChildCreated(const uint64_t& aChild, const base::ProcessId& aOwnerPid)
CompositorBridgeParent::RecvMapAndNotifyChildCreated(const uint64_t& aChild,
const base::ProcessId& aOwnerPid,
CompositorOptions* aOptions)
{
// We only use this message when the remote compositor is in the GPU process.
// It is harmless to call it, though.
@ -1569,6 +1581,7 @@ CompositorBridgeParent::RecvMapAndNotifyChildCreated(const uint64_t& aChild, con
MonitorAutoLock lock(*sIndirectLayerTreesLock);
NotifyChildCreated(aChild);
*aOptions = mOptions;
return IPC_OK();
}

Просмотреть файл

@ -188,9 +188,9 @@ public:
virtual mozilla::ipc::IPCResult RecvWillClose() override;
virtual mozilla::ipc::IPCResult RecvPause() override;
virtual mozilla::ipc::IPCResult RecvResume() override;
virtual mozilla::ipc::IPCResult RecvNotifyChildCreated(const uint64_t& child) override;
virtual mozilla::ipc::IPCResult RecvMapAndNotifyChildCreated(const uint64_t& child, const base::ProcessId& pid) override;
virtual mozilla::ipc::IPCResult RecvNotifyChildRecreated(const uint64_t& child) override;
virtual mozilla::ipc::IPCResult RecvNotifyChildCreated(const uint64_t& child, CompositorOptions* aOptions) override;
virtual mozilla::ipc::IPCResult RecvMapAndNotifyChildCreated(const uint64_t& child, const base::ProcessId& pid, CompositorOptions* aOptions) override;
virtual mozilla::ipc::IPCResult RecvNotifyChildRecreated(const uint64_t& child, CompositorOptions* aOptions) override;
virtual mozilla::ipc::IPCResult RecvAdoptChild(const uint64_t& child) override;
virtual mozilla::ipc::IPCResult RecvMakeSnapshot(const SurfaceDescriptor& aInSnapshot,
const gfx::IntRect& aRect) override;

Просмотреть файл

@ -250,7 +250,8 @@ CrossProcessCompositorBridgeParent::DeallocPWebRenderBridgeParent(PWebRenderBrid
}
mozilla::ipc::IPCResult
CrossProcessCompositorBridgeParent::RecvNotifyChildCreated(const uint64_t& child)
CrossProcessCompositorBridgeParent::RecvNotifyChildCreated(const uint64_t& child,
CompositorOptions* aOptions)
{
MonitorAutoLock lock(*sIndirectLayerTreesLock);
for (LayerTreeMap::iterator it = sIndirectLayerTrees.begin();
@ -258,6 +259,7 @@ CrossProcessCompositorBridgeParent::RecvNotifyChildCreated(const uint64_t& child
CompositorBridgeParent::LayerTreeState* lts = &it->second;
if (lts->mParent && lts->mCrossProcessParent == this) {
lts->mParent->NotifyChildCreated(child);
*aOptions = lts->mParent->GetOptions();
return IPC_OK();
}
}
@ -265,7 +267,9 @@ CrossProcessCompositorBridgeParent::RecvNotifyChildCreated(const uint64_t& child
}
mozilla::ipc::IPCResult
CrossProcessCompositorBridgeParent::RecvMapAndNotifyChildCreated(const uint64_t& child, const base::ProcessId& pid)
CrossProcessCompositorBridgeParent::RecvMapAndNotifyChildCreated(const uint64_t& child,
const base::ProcessId& pid,
CompositorOptions* aOptions)
{
// This can only be called from the browser process, as the mapping
// ensures proper window ownership of layer trees.

Просмотреть файл

@ -55,9 +55,9 @@ public:
virtual mozilla::ipc::IPCResult RecvPause() override { return IPC_OK(); }
virtual mozilla::ipc::IPCResult RecvResume() override { return IPC_OK(); }
virtual mozilla::ipc::IPCResult RecvForceIsFirstPaint() override { return IPC_OK(); }
virtual mozilla::ipc::IPCResult RecvNotifyChildCreated(const uint64_t& child) override;
virtual mozilla::ipc::IPCResult RecvMapAndNotifyChildCreated(const uint64_t& child, const base::ProcessId& pid) override;
virtual mozilla::ipc::IPCResult RecvNotifyChildRecreated(const uint64_t& child) override { return IPC_FAIL_NO_REASON(this); }
virtual mozilla::ipc::IPCResult RecvNotifyChildCreated(const uint64_t& child, CompositorOptions* aOptions) override;
virtual mozilla::ipc::IPCResult RecvMapAndNotifyChildCreated(const uint64_t& child, const base::ProcessId& pid, CompositorOptions* aOptions) override;
virtual mozilla::ipc::IPCResult RecvNotifyChildRecreated(const uint64_t& child, CompositorOptions* aOptions) override { return IPC_FAIL_NO_REASON(this); }
virtual mozilla::ipc::IPCResult RecvAdoptChild(const uint64_t& child) override { return IPC_FAIL_NO_REASON(this); }
virtual mozilla::ipc::IPCResult RecvMakeSnapshot(const SurfaceDescriptor& aInSnapshot,
const gfx::IntRect& aRect) override

Просмотреть файл

@ -174,13 +174,15 @@ parent:
// See bug 1316632 comment #33 for why this has to be sync. Otherwise,
// there are ordering issues with SendPLayerTransactionConstructor.
sync NotifyChildCreated(uint64_t id);
sync NotifyChildCreated(uint64_t id)
returns (CompositorOptions compositorOptions);
// This version of NotifyChildCreated also performs a layer tree mapping.
//
// See bug 1316632 comment #33 for why this has to be sync. Otherwise,
// there are ordering issues with SendPLayerTransactionConstructor.
sync MapAndNotifyChildCreated(uint64_t id, ProcessId owner);
sync MapAndNotifyChildCreated(uint64_t id, ProcessId owner)
returns (CompositorOptions compositorOptions);
async AdoptChild(uint64_t id);
@ -188,7 +190,8 @@ parent:
// reassociate layers. This must be synchronous to ensure that the
// association happens before PLayerTransactions are sent over the
// cross-process bridge.
sync NotifyChildRecreated(uint64_t id);
sync NotifyChildRecreated(uint64_t id)
returns (CompositorOptions compositorOptions);
// Make a snapshot of the content that would have been drawn to our
// render target at the time this message is received. If the size

Просмотреть файл

@ -125,10 +125,11 @@ RenderFrameParent::Init(nsFrameLoader* aFrameLoader)
mLayersConnected = gpm->AllocateAndConnectLayerTreeId(
compositor,
browser->Manager()->AsContentParent()->OtherPid(),
&mLayersId);
&mLayersId,
&mCompositorOptions);
} else if (XRE_IsContentProcess()) {
ContentChild::GetSingleton()->SendAllocateLayerTreeId(browser->Manager()->ChildID(), browser->GetTabId(), &mLayersId);
mLayersConnected = CompositorBridgeChild::Get()->SendNotifyChildCreated(mLayersId);
mLayersConnected = CompositorBridgeChild::Get()->SendNotifyChildCreated(mLayersId, &mCompositorOptions);
}
mInitted = true;
@ -215,6 +216,7 @@ RenderFrameParent::OwnerContentChanged(nsIContent* aContent)
// Perhaps the document containing this frame currently has no presentation?
if (lm && lm->GetCompositorBridgeChild()) {
mLayersConnected = lm->GetCompositorBridgeChild()->SendAdoptChild(mLayersId);
lm->GetCompositorBridgeChild()->SendGetCompositorOptions(mLayersId, &mCompositorOptions);
FrameLayerBuilder::InvalidateAllLayers(lm);
}
}
@ -318,7 +320,7 @@ RenderFrameParent::EnsureLayersConnected()
return;
}
mLayersConnected = lm->GetCompositorBridgeChild()->SendNotifyChildRecreated(mLayersId);
mLayersConnected = lm->GetCompositorBridgeChild()->SendNotifyChildRecreated(mLayersId, &mCompositorOptions);
}
} // namespace layout

Просмотреть файл

@ -12,6 +12,7 @@
#include <map>
#include "mozilla/layers/APZUtils.h"
#include "mozilla/layers/CompositorOptions.h"
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/layout/PRenderFrameParent.h"
#include "nsDisplayList.h"
@ -36,6 +37,7 @@ class RenderFrameParent : public PRenderFrameParent
{
typedef mozilla::layers::AsyncDragMetrics AsyncDragMetrics;
typedef mozilla::layers::FrameMetrics FrameMetrics;
typedef mozilla::layers::CompositorOptions CompositorOptions;
typedef mozilla::layers::ContainerLayer ContainerLayer;
typedef mozilla::layers::Layer Layer;
typedef mozilla::layers::LayerManager LayerManager;
@ -82,6 +84,7 @@ public:
inline uint64_t GetLayersId() const { return mLayersId; }
inline bool IsLayersConnected() const { return mLayersConnected; }
inline CompositorOptions GetCompositorOptions() const { return mCompositorOptions; }
void TakeFocusForClickFromTap();
@ -104,6 +107,10 @@ private:
// layers id. In some cases this RenderFrameParent is not connected to the
// compositor and so this flag is false.
bool mLayersConnected;
// The compositor options for this layers id. This is only meaningful if
// the compositor actually knows about this layers id (i.e. when mLayersConnected
// is true).
CompositorOptions mCompositorOptions;
RefPtr<nsFrameLoader> mFrameLoader;
RefPtr<ContainerLayer> mContainer;