mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset fa6ef0b63025 (bug 889515) for OSX browser-chrome bustage on a CLOSED TREE
--HG-- extra : amend_source : f0064ef485170a679744ea3e211535a9d58f0fc9
This commit is contained in:
parent
e97234c1c7
commit
938c03b734
@ -232,16 +232,6 @@ ClientLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags)
|
||||
return true;
|
||||
}
|
||||
|
||||
CompositorChild *
|
||||
ClientLayerManager::GetRemoteRenderer()
|
||||
{
|
||||
if (!mWidget) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return mWidget->GetRemoteRenderer();
|
||||
}
|
||||
|
||||
void
|
||||
ClientLayerManager::MakeSnapshotIfRequired()
|
||||
{
|
||||
@ -249,7 +239,7 @@ ClientLayerManager::MakeSnapshotIfRequired()
|
||||
return;
|
||||
}
|
||||
if (mWidget) {
|
||||
if (CompositorChild* remoteRenderer = GetRemoteRenderer()) {
|
||||
if (CompositorChild* remoteRenderer = mWidget->GetRemoteRenderer()) {
|
||||
nsIntRect bounds;
|
||||
mWidget->GetBounds(bounds);
|
||||
SurfaceDescriptor inSnapshot, snapshot;
|
||||
|
@ -53,11 +53,6 @@ public:
|
||||
virtual already_AddRefed<ColorLayer> CreateColorLayer();
|
||||
virtual already_AddRefed<RefLayer> CreateRefLayer();
|
||||
|
||||
virtual TextureFactoryIdentifier GetTextureFactoryIdentifier() MOZ_OVERRIDE
|
||||
{
|
||||
return mTextureFactoryIdentifier;
|
||||
}
|
||||
|
||||
virtual void FlushRendering() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool NeedsWidgetInvalidation() MOZ_OVERRIDE { return false; }
|
||||
@ -94,8 +89,6 @@ public:
|
||||
void* GetThebesLayerCallbackData() const
|
||||
{ return mThebesLayerCallbackData; }
|
||||
|
||||
CompositorChild *GetRemoteRenderer();
|
||||
|
||||
/**
|
||||
* Called for each iteration of a progressive tile update. Fills
|
||||
* aViewport, aScaleX and aScaleY with the current scale and viewport
|
||||
|
@ -40,6 +40,10 @@ public:
|
||||
typedef gfxASurface::gfxContentType gfxContentType;
|
||||
|
||||
CompositableForwarder()
|
||||
: mMaxTextureSize(0)
|
||||
, mCompositorBackend(layers::LAYERS_NONE)
|
||||
, mSupportsTextureBlitting(false)
|
||||
, mSupportsPartialUploads(false)
|
||||
{}
|
||||
|
||||
/**
|
||||
@ -146,7 +150,7 @@ public:
|
||||
/**
|
||||
* Returns the maximum texture size supported by the compositor.
|
||||
*/
|
||||
virtual int32_t GetMaxTextureSize() const { return mTextureFactoryIdentifier.mMaxTextureSize; }
|
||||
virtual int32_t GetMaxTextureSize() const { return mMaxTextureSize; }
|
||||
|
||||
bool IsOnCompositorSide() const MOZ_OVERRIDE { return false; }
|
||||
|
||||
@ -157,21 +161,24 @@ public:
|
||||
*/
|
||||
LayersBackend GetCompositorBackendType() const
|
||||
{
|
||||
return mTextureFactoryIdentifier.mParentBackend;
|
||||
return mCompositorBackend;
|
||||
}
|
||||
|
||||
bool SupportsTextureBlitting() const
|
||||
{
|
||||
return mTextureFactoryIdentifier.mSupportsTextureBlitting;
|
||||
return mSupportsTextureBlitting;
|
||||
}
|
||||
|
||||
bool SupportsPartialUploads() const
|
||||
{
|
||||
return mTextureFactoryIdentifier.mSupportsPartialUploads;
|
||||
return mSupportsPartialUploads;
|
||||
}
|
||||
|
||||
protected:
|
||||
TextureFactoryIdentifier mTextureFactoryIdentifier;
|
||||
uint32_t mMaxTextureSize;
|
||||
LayersBackend mCompositorBackend;
|
||||
bool mSupportsTextureBlitting;
|
||||
bool mSupportsPartialUploads;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -36,6 +36,7 @@ namespace layers {
|
||||
// FIXME/bug 774386: we're assuming that there's only one
|
||||
// CompositorParent, but that's not always true. This assumption only
|
||||
// affects CrossProcessCompositorParent below.
|
||||
static CompositorParent* sCurrentCompositor;
|
||||
static Thread* sCompositorThread = nullptr;
|
||||
// manual reference count of the compositor thread.
|
||||
static int sCompositorThreadRefCount = 0;
|
||||
@ -152,6 +153,9 @@ CompositorParent::CompositorParent(nsIWidget* aWidget,
|
||||
CompositorLoop()->PostTask(FROM_HERE, NewRunnableFunction(&AddCompositor,
|
||||
this, &mCompositorID));
|
||||
|
||||
if (!sCurrentCompositor) {
|
||||
sCurrentCompositor = this;
|
||||
}
|
||||
++sCompositorThreadRefCount;
|
||||
}
|
||||
|
||||
@ -165,6 +169,9 @@ CompositorParent::~CompositorParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(CompositorParent);
|
||||
|
||||
if (this == sCurrentCompositor) {
|
||||
sCurrentCompositor = NULL;
|
||||
}
|
||||
ReleaseCompositorThread();
|
||||
}
|
||||
|
||||
@ -670,19 +677,6 @@ CompositorParent::SetTimeAndSampleAnimations(TimeStamp aTime, bool aIsTesting)
|
||||
typedef map<uint64_t, CompositorParent::LayerTreeState> LayerTreeMap;
|
||||
static LayerTreeMap sIndirectLayerTrees;
|
||||
|
||||
bool
|
||||
CompositorParent::RecvNotifyChildCreated(const uint64_t& child)
|
||||
{
|
||||
NotifyChildCreated(child);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CompositorParent::NotifyChildCreated(uint64_t aChild)
|
||||
{
|
||||
sIndirectLayerTrees[aChild].mParent = this;
|
||||
}
|
||||
|
||||
/*static*/ uint64_t
|
||||
CompositorParent::AllocateLayerTreeId()
|
||||
{
|
||||
@ -716,7 +710,7 @@ UpdateControllerForLayersId(uint64_t aLayersId,
|
||||
|
||||
// Notify the AsyncPanZoomController about the current compositor so that it
|
||||
// can request composites off the compositor thread.
|
||||
aController->SetCompositorParent(sIndirectLayerTrees[aLayersId].mParent);
|
||||
aController->SetCompositorParent(sCurrentCompositor);
|
||||
}
|
||||
|
||||
/*static*/ void
|
||||
@ -758,7 +752,6 @@ public:
|
||||
virtual bool RecvStop() MOZ_OVERRIDE { return true; }
|
||||
virtual bool RecvPause() MOZ_OVERRIDE { return true; }
|
||||
virtual bool RecvResume() MOZ_OVERRIDE { return true; }
|
||||
virtual bool RecvNotifyChildCreated(const uint64_t& child) MOZ_OVERRIDE;
|
||||
virtual bool RecvMakeSnapshot(const SurfaceDescriptor& aInSnapshot,
|
||||
SurfaceDescriptor* aOutSnapshot)
|
||||
{ return true; }
|
||||
@ -858,7 +851,7 @@ CrossProcessCompositorParent::AllocPLayerTransactionParent(const LayersBackend&
|
||||
{
|
||||
MOZ_ASSERT(aId != 0);
|
||||
|
||||
nsRefPtr<LayerManager> lm = sIndirectLayerTrees[aId].mParent->GetLayerManager();
|
||||
nsRefPtr<LayerManager> lm = sCurrentCompositor->GetLayerManager();
|
||||
*aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier();
|
||||
return new LayerTransactionParent(lm->AsLayerManagerComposite(), this, aId);
|
||||
}
|
||||
@ -872,13 +865,6 @@ CrossProcessCompositorParent::DeallocPLayerTransactionParent(PLayerTransactionPa
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CrossProcessCompositorParent::RecvNotifyChildCreated(const uint64_t& child)
|
||||
{
|
||||
sIndirectLayerTrees[child].mParent->NotifyChildCreated(child);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CrossProcessCompositorParent::ShadowLayersUpdated(
|
||||
LayerTransactionParent* aLayerTree,
|
||||
@ -893,7 +879,7 @@ CrossProcessCompositorParent::ShadowLayersUpdated(
|
||||
}
|
||||
UpdateIndirectTree(id, shadowRoot, aTargetConfig, isFirstPaint);
|
||||
|
||||
sIndirectLayerTrees[id].mParent->NotifyShadowTreeTransaction();
|
||||
sCurrentCompositor->NotifyShadowTreeTransaction();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -53,7 +53,6 @@ public:
|
||||
virtual bool RecvStop() MOZ_OVERRIDE;
|
||||
virtual bool RecvPause() MOZ_OVERRIDE;
|
||||
virtual bool RecvResume() MOZ_OVERRIDE;
|
||||
virtual bool RecvNotifyChildCreated(const uint64_t& child) MOZ_OVERRIDE;
|
||||
virtual bool RecvMakeSnapshot(const SurfaceDescriptor& aInSnapshot,
|
||||
SurfaceDescriptor* aOutSnapshot);
|
||||
virtual bool RecvFlushRendering() MOZ_OVERRIDE;
|
||||
@ -75,8 +74,6 @@ public:
|
||||
|
||||
LayerManagerComposite* GetLayerManager() { return mLayerManager; }
|
||||
|
||||
void NotifyChildCreated(uint64_t aChild);
|
||||
|
||||
void AsyncRender();
|
||||
|
||||
// Can be called from any thread
|
||||
@ -155,7 +152,6 @@ public:
|
||||
struct LayerTreeState {
|
||||
nsRefPtr<Layer> mRoot;
|
||||
nsRefPtr<AsyncPanZoomController> mController;
|
||||
CompositorParent *mParent;
|
||||
TargetConfig mTargetConfig;
|
||||
};
|
||||
|
||||
|
@ -43,8 +43,6 @@ parent:
|
||||
sync Pause();
|
||||
sync Resume();
|
||||
|
||||
async NotifyChildCreated(uint64_t id);
|
||||
|
||||
// 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
|
||||
// or format of |inSnapshot| doesn't match our render target,
|
||||
|
@ -160,7 +160,10 @@ struct AutoTxnEnd {
|
||||
void
|
||||
CompositableForwarder::IdentifyTextureHost(const TextureFactoryIdentifier& aIdentifier)
|
||||
{
|
||||
mTextureFactoryIdentifier = aIdentifier;
|
||||
mMaxTextureSize = aIdentifier.mMaxTextureSize;
|
||||
mCompositorBackend = aIdentifier.mParentBackend;
|
||||
mSupportsTextureBlitting = aIdentifier.mSupportsTextureBlitting;
|
||||
mSupportsPartialUploads = aIdentifier.mSupportsPartialUploads;
|
||||
}
|
||||
|
||||
ShadowLayerForwarder::ShadowLayerForwarder()
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include "nsViewportFrame.h"
|
||||
#include "RenderFrameParent.h"
|
||||
#include "mozilla/layers/LayerManagerComposite.h"
|
||||
#include "mozilla/layers/CompositorChild.h"
|
||||
#include "ClientLayerManager.h"
|
||||
|
||||
typedef nsContentView::ViewConfig ViewConfig;
|
||||
using namespace mozilla::dom;
|
||||
@ -604,7 +602,7 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
|
||||
|
||||
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
|
||||
// Perhaps the document containing this frame currently has no presentation?
|
||||
if (lm && lm->GetBackendType() == LAYERS_CLIENT) {
|
||||
if (lm && lm->AsLayerManagerComposite()) {
|
||||
*aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier();
|
||||
} else {
|
||||
*aTextureFactoryIdentifier = TextureFactoryIdentifier();
|
||||
@ -614,10 +612,6 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
|
||||
// Our remote frame will push layers updates to the compositor,
|
||||
// and we'll keep an indirect reference to that tree.
|
||||
*aId = mLayersId = CompositorParent::AllocateLayerTreeId();
|
||||
if (lm && lm->GetBackendType() == LAYERS_CLIENT) {
|
||||
ClientLayerManager *clientManager = static_cast<ClientLayerManager*>(lm.get());
|
||||
clientManager->GetRemoteRenderer()->SendNotifyChildCreated(mLayersId);
|
||||
}
|
||||
if (aScrollingBehavior == ASYNC_PAN_ZOOM) {
|
||||
mContentController = new RemoteContentController(this);
|
||||
mPanZoomController = new AsyncPanZoomController(
|
||||
|
Loading…
Reference in New Issue
Block a user