Backed out changeset 00c2ba04f8d4 (bug 879475)

This commit is contained in:
Ed Morley 2014-06-09 11:27:58 +01:00
parent dc7db7a234
commit 8014af9b42
5 changed files with 1 additions and 51 deletions

View File

@ -1397,39 +1397,6 @@ ContentParent::ProcessingError(Result what)
KillHard();
}
typedef std::pair<ContentParent*, std::set<uint64_t> > IDPair;
static std::map<ContentParent*, std::set<uint64_t> > sNestedBrowserIds;
bool
ContentParent::RecvAllocateLayerTreeId(uint64_t* aId)
{
*aId = CompositorParent::AllocateLayerTreeId();
auto iter = sNestedBrowserIds.find(this);
if (iter == sNestedBrowserIds.end()) {
std::set<uint64_t> ids;
ids.insert(*aId);
sNestedBrowserIds.insert(IDPair(this, ids));
} else {
iter->second.insert(*aId);
}
return true;
}
bool
ContentParent::RecvDeallocateLayerTreeId(const uint64_t& aId)
{
auto iter = sNestedBrowserIds.find(this);
if (iter != sNestedBrowserIds.end() &&
iter->second.find(aId) != iter->second.end()) {
CompositorParent::DeallocateLayerTreeId(aId);
} else {
// You can't deallocate layer tree ids that you didn't allocate
KillHard();
}
return true;
}
namespace {
void

View File

@ -591,9 +591,6 @@ private:
virtual void ProcessingError(Result what) MOZ_OVERRIDE;
virtual bool RecvAllocateLayerTreeId(uint64_t* aId) MOZ_OVERRIDE;
virtual bool RecvDeallocateLayerTreeId(const uint64_t& aId) MOZ_OVERRIDE;
virtual bool RecvGetGraphicsFeatureStatus(const int32_t& aFeature,
int32_t* aStatus,
bool* aSuccess) MOZ_OVERRIDE;

View File

@ -596,11 +596,6 @@ parent:
sync KeywordToURI(nsCString keyword)
returns (OptionalInputStreamParams postData, OptionalURIParams uri);
// Tell the compositor to allocate a layer tree id for nested remote mozbrowsers.
sync AllocateLayerTreeId()
returns (uint64_t id);
async DeallocateLayerTreeId(uint64_t id);
sync SpeakerManagerForceSpeaker(bool aEnable);
sync SpeakerManagerGetSpeakerStatus()

View File

@ -84,7 +84,6 @@ WalkTheTree(Layer* aLayer,
ref->ConnectReferentLayer(referent);
} else {
ref->DetachReferentLayer(referent);
WalkTheTree<OP>(referent, aReady, aTargetConfig);
}
}
}

View File

@ -13,7 +13,6 @@
# include "LayerManagerD3D9.h"
#endif //MOZ_ENABLE_D3D9_LAYER
#include "mozilla/BrowserElementParent.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/layers/APZCTreeManager.h"
#include "mozilla/layers/CompositorParent.h"
@ -750,9 +749,6 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
mContentController = new RemoteContentController(this);
CompositorParent::SetControllerForLayerTree(mLayersId, mContentController);
}
} else if (XRE_GetProcessType() == GeckoProcessType_Content) {
ContentChild::GetSingleton()->SendAllocateLayerTreeId(aId);
mLayersId = *aId;
}
// Set a default RenderFrameParent
mFrameLoader->SetCurrentRemoteFrame(this);
@ -950,11 +946,7 @@ void
RenderFrameParent::ActorDestroy(ActorDestroyReason why)
{
if (mLayersId != 0) {
if (XRE_GetProcessType() == GeckoProcessType_Content) {
ContentChild::GetSingleton()->SendDeallocateLayerTreeId(mLayersId);
} else {
CompositorParent::DeallocateLayerTreeId(mLayersId);
}
if (mContentController) {
// Stop our content controller from requesting repaints of our
// content.