mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Backed out changeset 249413f56629 (bug 1009628) for causing permanent orange.
This commit is contained in:
parent
a535add362
commit
134e23c76c
@ -112,7 +112,7 @@ interface nsIContentViewManager : nsISupports
|
||||
readonly attribute nsIContentView rootContentView;
|
||||
};
|
||||
|
||||
[scriptable, builtinclass, uuid(d52ca6a8-8237-4ae0-91d7-7be4f1db24ef)]
|
||||
[scriptable, builtinclass, uuid(a5cefcc8-551b-4901-83f3-7436b09ecaba)]
|
||||
interface nsIFrameLoader : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -205,13 +205,6 @@ interface nsIFrameLoader : nsISupports
|
||||
in long aModifiers,
|
||||
[optional] in boolean aPreventDefault);
|
||||
|
||||
/**
|
||||
* Request that the next time a remote layer transaction has been
|
||||
* received by the Compositor, a MozAfterRemoteFrame event be sent
|
||||
* to the window.
|
||||
*/
|
||||
void requestNotifyAfterRemotePaint();
|
||||
|
||||
/**
|
||||
* The default rendering mode is synchronous scrolling. In this
|
||||
* mode, it's an error to try to set a target viewport.
|
||||
|
@ -2674,29 +2674,6 @@ nsFrameLoader::ResetPermissionManagerStatus()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the RequestNotifyAfterRemotePaint message to the current Tab.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsFrameLoader::RequestNotifyAfterRemotePaint()
|
||||
{
|
||||
// If remote browsing (e10s), handle this with the TabParent.
|
||||
if (mRemoteBrowser) {
|
||||
unused << mRemoteBrowser->SendRequestNotifyAfterRemotePaint();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// If not remote browsing, directly use the document's window.
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_GetInterface(mDocShell);
|
||||
if (!window) {
|
||||
NS_WARNING("Unable to get window for synchronous MozAfterRemotePaint event.");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
window->SetRequestNotifyAfterRemotePaint();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* [infallible] */ NS_IMETHODIMP
|
||||
nsFrameLoader::SetVisible(bool aVisible)
|
||||
{
|
||||
|
@ -578,7 +578,7 @@ nsPIDOMWindow::nsPIDOMWindow(nsPIDOMWindow *aOuterWindow)
|
||||
mInnerWindow(nullptr), mOuterWindow(aOuterWindow),
|
||||
// Make sure no actual window ends up with mWindowID == 0
|
||||
mWindowID(++gNextWindowID), mHasNotifiedGlobalCreated(false),
|
||||
mMarkedCCGeneration(0), mSendAfterRemotePaint(false)
|
||||
mMarkedCCGeneration(0)
|
||||
{}
|
||||
|
||||
nsPIDOMWindow::~nsPIDOMWindow() {}
|
||||
@ -3796,21 +3796,6 @@ nsPIDOMWindow::RefreshMediaElements()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsPIDOMWindow::SendAfterRemotePaintIfRequested()
|
||||
{
|
||||
if (!mSendAfterRemotePaint) {
|
||||
return;
|
||||
}
|
||||
|
||||
mSendAfterRemotePaint = false;
|
||||
|
||||
nsContentUtils::DispatchChromeEvent(GetExtantDoc(),
|
||||
GetParentTarget(),
|
||||
NS_LITERAL_STRING("MozAfterRemotePaint"),
|
||||
false, false);
|
||||
}
|
||||
|
||||
// nsISpeechSynthesisGetter
|
||||
|
||||
#ifdef MOZ_WEBSPEECH
|
||||
|
@ -724,18 +724,6 @@ public:
|
||||
{
|
||||
return mMarkedCCGeneration;
|
||||
}
|
||||
|
||||
// Sets the condition that we send an NS_AFTER_REMOTE_PAINT message just before the next
|
||||
// composite. Used in non-e10s implementations.
|
||||
void SetRequestNotifyAfterRemotePaint()
|
||||
{
|
||||
mSendAfterRemotePaint = true;
|
||||
}
|
||||
|
||||
// Sends an NS_AFTER_REMOTE_PAINT message if requested by
|
||||
// SetRequestNotifyAfterRemotePaint().
|
||||
void SendAfterRemotePaintIfRequested();
|
||||
|
||||
protected:
|
||||
// The nsPIDOMWindow constructor. The aOuterWindow argument should
|
||||
// be null if and only if the created window itself is an outer
|
||||
@ -827,10 +815,6 @@ protected:
|
||||
bool mHasNotifiedGlobalCreated;
|
||||
|
||||
uint32_t mMarkedCCGeneration;
|
||||
|
||||
// If true, send an NS_AFTER_REMOTE_PAINT message before compositing in a
|
||||
// non-e10s implementation.
|
||||
bool mSendAfterRemotePaint;
|
||||
};
|
||||
|
||||
|
||||
|
@ -381,15 +381,6 @@ parent:
|
||||
sync RequestNativeKeyBindings(WidgetKeyboardEvent event)
|
||||
returns (MaybeNativeKeyBinding bindings);
|
||||
|
||||
/**
|
||||
* Child informs the parent that the graphics objects are ready for
|
||||
* compositing. This is sent when all pending changes have been
|
||||
* sent to the compositor and are ready to be shown on the next composite.
|
||||
* @see PCompositor
|
||||
* @see RequestNotifyAfterRemotePaint
|
||||
*/
|
||||
async RemotePaintIsReady();
|
||||
|
||||
child:
|
||||
/**
|
||||
* Notify the remote browser that it has been Show()n on this
|
||||
@ -507,14 +498,6 @@ child:
|
||||
*/
|
||||
SetIsDocShellActive(bool aIsActive);
|
||||
|
||||
/**
|
||||
* The parent (chrome thread) requests that the child inform it when
|
||||
* the graphics objects are ready to display.
|
||||
* @see PCompositor
|
||||
* @see RemotePaintIsReady
|
||||
*/
|
||||
async RequestNotifyAfterRemotePaint();
|
||||
|
||||
/**
|
||||
* Tell the child that the UI resolution changed for the containing
|
||||
* window.
|
||||
|
@ -2857,19 +2857,6 @@ TabChild::OnHideTooltip()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvRequestNotifyAfterRemotePaint()
|
||||
{
|
||||
// Get the CompositorChild instance for this content thread.
|
||||
CompositorChild* compositor = CompositorChild::Get();
|
||||
|
||||
// Tell the CompositorChild that, when it gets a RemotePaintIsReady
|
||||
// message that it should forward it us so that we can bounce it to our
|
||||
// RenderFrameParent.
|
||||
compositor->RequestNotifyAfterRemotePaint(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvUIResolutionChanged()
|
||||
{
|
||||
|
@ -501,8 +501,6 @@ protected:
|
||||
|
||||
virtual bool DeallocPIndexedDBChild(PIndexedDBChild* aActor) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool RecvRequestNotifyAfterRemotePaint();
|
||||
|
||||
private:
|
||||
/**
|
||||
* Create a new TabChild object.
|
||||
|
@ -2151,25 +2151,6 @@ TabParent::SetIsDocShellActive(bool isActive)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvRemotePaintIsReady()
|
||||
{
|
||||
nsCOMPtr<mozilla::dom::EventTarget> target = do_QueryInterface(mFrameElement);
|
||||
if (!target) {
|
||||
NS_WARNING("Could not locate target for MozAfterRemotePaint message.");
|
||||
return true;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMEvent> event;
|
||||
NS_NewDOMEvent(getter_AddRefs(event), mFrameElement, nullptr, nullptr);
|
||||
event->InitEvent(NS_LITERAL_STRING("MozAfterRemotePaint"), false, false);
|
||||
event->SetTrusted(true);
|
||||
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
|
||||
bool dummy;
|
||||
mFrameElement->DispatchEvent(event, &dummy);
|
||||
return true;
|
||||
}
|
||||
|
||||
class FakeChannel MOZ_FINAL : public nsIChannel,
|
||||
public nsIAuthPromptCallback,
|
||||
public nsIInterfaceRequestor,
|
||||
|
@ -352,8 +352,6 @@ protected:
|
||||
bool* aSuccess) MOZ_OVERRIDE;
|
||||
virtual bool DeallocPRenderFrameParent(PRenderFrameParent* aFrame) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool RecvRemotePaintIsReady() MOZ_OVERRIDE;
|
||||
|
||||
// IME
|
||||
static TabParent *mIMETabParent;
|
||||
nsString mIMECacheText;
|
||||
|
@ -21,11 +21,8 @@
|
||||
#include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop, etc
|
||||
#include "FrameLayerBuilder.h"
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
using mozilla::layers::LayerTransactionChild;
|
||||
using mozilla::dom::TabChildBase;
|
||||
using mozilla::unused;
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
@ -259,39 +256,6 @@ CompositorChild::SharedFrameMetricsData::GetAPZCId()
|
||||
return mAPZCId;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
CompositorChild::RecvRemotePaintIsReady()
|
||||
{
|
||||
// Used on the content thread, this bounces the message to the
|
||||
// TabParent (via the TabChild) if the notification was previously requested.
|
||||
// XPCOM gives a soup of compiler errors when trying to do_QueryReference
|
||||
// so I'm using static_cast<>
|
||||
MOZ_LAYERS_LOG(("[RemoteGfx] CompositorChild received RemotePaintIsReady"));
|
||||
nsRefPtr<nsISupports> iTabChildBase(do_QueryReferent(mWeakTabChild));
|
||||
if (!iTabChildBase) {
|
||||
MOZ_LAYERS_LOG(("[RemoteGfx] Note: TabChild was released before RemotePaintIsReady. "
|
||||
"MozAfterRemotePaint will not be sent to listener."));
|
||||
return true;
|
||||
}
|
||||
TabChildBase* tabChildBase = static_cast<TabChildBase*>(iTabChildBase.get());
|
||||
TabChild* tabChild = static_cast<TabChild*>(tabChildBase);
|
||||
MOZ_ASSERT(tabChild);
|
||||
unused << tabChild->SendRemotePaintIsReady();
|
||||
mWeakTabChild = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CompositorChild::RequestNotifyAfterRemotePaint(TabChild* aTabChild)
|
||||
{
|
||||
MOZ_ASSERT(aTabChild, "NULL TabChild not allowed in CompositorChild::RequestNotifyAfterRemotePaint");
|
||||
mWeakTabChild = do_GetWeakReference( static_cast<dom::TabChildBase*>(aTabChild) );
|
||||
unused << SendRequestNotifyAfterRemotePaint();
|
||||
}
|
||||
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
||||
|
@ -18,20 +18,12 @@
|
||||
#include "nsHashKeys.h" // for nsUint64HashKey
|
||||
#include "nsISupportsImpl.h" // for NS_INLINE_DECL_REFCOUNTING
|
||||
#include "ThreadSafeRefcountingWithMainThreadDestruction.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
class nsIObserver;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
class TabChild;
|
||||
}
|
||||
|
||||
namespace layers {
|
||||
|
||||
using mozilla::dom::TabChild;
|
||||
|
||||
class ClientLayerManager;
|
||||
class CompositorParent;
|
||||
struct FrameMetrics;
|
||||
@ -70,14 +62,6 @@ public:
|
||||
|
||||
virtual bool RecvDidComposite(const uint64_t& aId, const uint64_t& aTransactionId) MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Request that the parent tell us when graphics are ready on GPU.
|
||||
* When we get that message, we bounce it to the TabParent via
|
||||
* the TabChild
|
||||
* @param tabChild The object to bounce the note to. Non-NULL.
|
||||
*/
|
||||
void RequestNotifyAfterRemotePaint(TabChild* aTabChild);
|
||||
|
||||
private:
|
||||
// Private destructor, to discourage deletion outside of Release():
|
||||
virtual ~CompositorChild();
|
||||
@ -99,9 +83,6 @@ private:
|
||||
virtual bool RecvReleaseSharedCompositorFrameMetrics(const ViewID& aId,
|
||||
const uint32_t& aAPZCId) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool
|
||||
RecvRemotePaintIsReady() MOZ_OVERRIDE;
|
||||
|
||||
// Class used to store the shared FrameMetrics, mutex, and APZCId in a hash table
|
||||
class SharedFrameMetricsData {
|
||||
public:
|
||||
@ -136,10 +117,6 @@ private:
|
||||
// compositor context in another process.
|
||||
static CompositorChild* sCompositor;
|
||||
|
||||
// Weakly hold the TabChild that made a request to be alerted when
|
||||
// the transaction has been received.
|
||||
nsWeakPtr mWeakTabChild; // type is TabChild
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(CompositorChild);
|
||||
|
||||
// When we receive overfill numbers, notify these client layer managers
|
||||
|
@ -1126,7 +1126,6 @@ public:
|
||||
: mTransport(aTransport)
|
||||
, mChildProcessId(aOtherProcess)
|
||||
, mCompositorThreadHolder(sCompositorThreadHolder)
|
||||
, mNotifyAfterRemotePaint(false)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
@ -1154,11 +1153,6 @@ public:
|
||||
virtual bool RecvStartFrameTimeRecording(const int32_t& aBufferSize, uint32_t* aOutStartIndex) MOZ_OVERRIDE { return true; }
|
||||
virtual bool RecvStopFrameTimeRecording(const uint32_t& aStartIndex, InfallibleTArray<float>* intervals) MOZ_OVERRIDE { return true; }
|
||||
|
||||
/**
|
||||
* Tells this CompositorParent to send a message when the compositor has received the transaction.
|
||||
*/
|
||||
virtual bool RecvRequestNotifyAfterRemotePaint() MOZ_OVERRIDE;
|
||||
|
||||
virtual PLayerTransactionParent*
|
||||
AllocPLayerTransactionParent(const nsTArray<LayersBackend>& aBackendHints,
|
||||
const uint64_t& aId,
|
||||
@ -1200,9 +1194,6 @@ private:
|
||||
base::ProcessId mChildProcessId;
|
||||
|
||||
nsRefPtr<CompositorThreadHolder> mCompositorThreadHolder;
|
||||
// If true, we should send a RemotePaintIsReady message when the layer transaction
|
||||
// is received
|
||||
bool mNotifyAfterRemotePaint;
|
||||
};
|
||||
|
||||
void
|
||||
@ -1295,13 +1286,6 @@ RemoveIndirectTree(uint64_t aId)
|
||||
sIndirectLayerTrees.erase(aId);
|
||||
}
|
||||
|
||||
bool
|
||||
CrossProcessCompositorParent::RecvRequestNotifyAfterRemotePaint()
|
||||
{
|
||||
mNotifyAfterRemotePaint = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CrossProcessCompositorParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
@ -1396,13 +1380,6 @@ CrossProcessCompositorParent::ShadowLayersUpdated(
|
||||
|
||||
state->mParent->NotifyShadowTreeTransaction(id, aIsFirstPaint, aScheduleComposite,
|
||||
aPaintSequenceNumber, aIsRepeatTransaction);
|
||||
|
||||
// Send the 'remote paint ready' message to the content thread if it has already asked.
|
||||
if(mNotifyAfterRemotePaint) {
|
||||
unused << SendRemotePaintIsReady();
|
||||
mNotifyAfterRemotePaint = false;
|
||||
}
|
||||
|
||||
aLayerTree->SetPendingTransactionId(aTransactionId);
|
||||
}
|
||||
|
||||
|
@ -117,10 +117,6 @@ public:
|
||||
virtual bool RecvStartFrameTimeRecording(const int32_t& aBufferSize, uint32_t* aOutStartIndex) MOZ_OVERRIDE;
|
||||
virtual bool RecvStopFrameTimeRecording(const uint32_t& aStartIndex, InfallibleTArray<float>* intervals) MOZ_OVERRIDE;
|
||||
|
||||
// Unused for chrome <-> compositor communication (which this class does).
|
||||
// @see CrossProcessCompositorParent::RecvRequestNotifyAfterRemotePaint
|
||||
virtual bool RecvRequestNotifyAfterRemotePaint() MOZ_OVERRIDE { return true; };
|
||||
|
||||
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
|
||||
|
||||
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||
|
@ -47,15 +47,6 @@ child:
|
||||
// The parent sends the child the requested fill ratio numbers.
|
||||
async Overfill(uint32_t aOverfill);
|
||||
|
||||
/**
|
||||
* Parent informs the child that the graphics objects are ready for
|
||||
* compositing. This usually means that the graphics objects (textures
|
||||
* and the like) are available on the GPU. This is used for chrome UI.
|
||||
* @see RequestNotifyAfterRemotePaint
|
||||
* @see PBrowser
|
||||
*/
|
||||
async RemotePaintIsReady();
|
||||
|
||||
parent:
|
||||
|
||||
// Child sends the parent a request for fill ratio numbers.
|
||||
@ -102,14 +93,6 @@ parent:
|
||||
// Notify the compositor that a region of the screen has been invalidated.
|
||||
async NotifyRegionInvalidated(nsIntRegion region);
|
||||
|
||||
/**
|
||||
* The child (content/chrome thread) requests that the parent inform it when
|
||||
* the graphics objects are ready to display.
|
||||
* @see PBrowser
|
||||
* @see RemotePaintIsReady
|
||||
*/
|
||||
async RequestNotifyAfterRemotePaint();
|
||||
|
||||
child:
|
||||
// Send back Compositor Frame Metrics from APZCs so tiled layers can
|
||||
// update progressively.
|
||||
|
@ -8383,13 +8383,6 @@ PresShell::WillPaintWindow()
|
||||
void
|
||||
PresShell::DidPaintWindow()
|
||||
{
|
||||
if (mDocument) {
|
||||
nsCOMPtr<nsPIDOMWindow> window = mDocument->GetWindow();
|
||||
if (window) {
|
||||
window->SendAfterRemotePaintIfRequested();
|
||||
}
|
||||
}
|
||||
|
||||
nsRootPresContext* rootPresContext = mPresContext->GetRootPresContext();
|
||||
if (rootPresContext != mPresContext) {
|
||||
// This could be a popup's presshell. No point in notifying XPConnect
|
||||
|
Loading…
Reference in New Issue
Block a user