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