mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Back out b157f5d0c235 (bug 974197) for b2g reftest-4 and reftest-6 failures
CLOSED TREE
This commit is contained in:
parent
a7ea91ce2d
commit
478c62f613
@ -74,7 +74,6 @@
|
||||
#include "nsILoadContext.h"
|
||||
#include "ipc/nsGUIEventIPC.h"
|
||||
#include "mozilla/gfx/Matrix.h"
|
||||
#include "ClientLayerManager.h"
|
||||
|
||||
#include "nsColorPickerProxy.h"
|
||||
|
||||
@ -107,9 +106,6 @@ static bool sCpowsEnabled = false;
|
||||
static int32_t sActiveDurationMs = 10;
|
||||
static bool sActiveDurationMsSet = false;
|
||||
|
||||
typedef nsDataHashtable<nsUint64HashKey, TabChild*> TabChildMap;
|
||||
static TabChildMap* sTabChildren;
|
||||
|
||||
NS_IMETHODIMP
|
||||
ContentListener::HandleEvent(nsIDOMEvent* aEvent)
|
||||
{
|
||||
@ -284,7 +280,6 @@ TabChild::TabChild(ContentChild* aManager, const TabContext& aContext, uint32_t
|
||||
, mManager(aManager)
|
||||
, mTabChildGlobal(nullptr)
|
||||
, mChromeFlags(aChromeFlags)
|
||||
, mLayersId(0)
|
||||
, mOuterRect(0, 0, 0, 0)
|
||||
, mInnerSize(0, 0)
|
||||
, mActivePointerId(-1)
|
||||
@ -1210,17 +1205,6 @@ TabChild::DestroyWindow()
|
||||
mRemoteFrame->Destroy();
|
||||
mRemoteFrame = nullptr;
|
||||
}
|
||||
|
||||
|
||||
if (mLayersId != 0) {
|
||||
MOZ_ASSERT(sTabChildren);
|
||||
sTabChildren->Remove(mLayersId);
|
||||
if (!sTabChildren->Count()) {
|
||||
delete sTabChildren;
|
||||
sTabChildren = nullptr;
|
||||
}
|
||||
mLayersId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
@ -2431,13 +2415,6 @@ TabChild::InitRenderingState()
|
||||
ImageBridgeChild::IdentifyCompositorTextureHost(mTextureFactoryIdentifier);
|
||||
|
||||
mRemoteFrame = remoteFrame;
|
||||
if (id != 0) {
|
||||
if (!sTabChildren) {
|
||||
sTabChildren = new TabChildMap;
|
||||
}
|
||||
sTabChildren->Put(id, this);
|
||||
mLayersId = id;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
mozilla::services::GetObserverService();
|
||||
@ -2644,26 +2621,6 @@ TabChild::GetFrom(nsIPresShell* aPresShell)
|
||||
return GetFrom(docShell);
|
||||
}
|
||||
|
||||
TabChild*
|
||||
TabChild::GetFrom(uint64_t aLayersId)
|
||||
{
|
||||
if (!sTabChildren) {
|
||||
return nullptr;
|
||||
}
|
||||
return sTabChildren->Get(aLayersId);
|
||||
}
|
||||
|
||||
void
|
||||
TabChild::DidComposite()
|
||||
{
|
||||
MOZ_ASSERT(mWidget);
|
||||
MOZ_ASSERT(mWidget->GetLayerManager());
|
||||
MOZ_ASSERT(mWidget->GetLayerManager()->GetBackendType() == LayersBackend::LAYERS_CLIENT);
|
||||
|
||||
ClientLayerManager *manager = static_cast<ClientLayerManager*>(mWidget->GetLayerManager());
|
||||
manager->DidComposite();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TabChild::OnShowTooltip(int32_t aXCoords, int32_t aYCoords, const char16_t *aTipText)
|
||||
{
|
||||
|
@ -381,9 +381,6 @@ public:
|
||||
}
|
||||
|
||||
static TabChild* GetFrom(nsIPresShell* aPresShell);
|
||||
static TabChild* GetFrom(uint64_t aLayersId);
|
||||
|
||||
void DidComposite();
|
||||
|
||||
static inline TabChild*
|
||||
GetFrom(nsIDOMWindow* aWindow)
|
||||
@ -501,7 +498,6 @@ private:
|
||||
nsRefPtr<ContentChild> mManager;
|
||||
nsRefPtr<TabChildGlobal> mTabChildGlobal;
|
||||
uint32_t mChromeFlags;
|
||||
uint64_t mLayersId;
|
||||
nsIntRect mOuterRect;
|
||||
ScreenIntSize mInnerSize;
|
||||
// When we're tracking a possible tap gesture, this is the "down"
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "mozilla/layers/LayerTransactionChild.h"
|
||||
#include "nsAString.h"
|
||||
#include "nsIWidget.h" // for nsIWidget
|
||||
#include "nsIWidgetListener.h"
|
||||
#include "nsTArray.h" // for AutoInfallibleTArray
|
||||
#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
@ -265,16 +264,6 @@ ClientLayerManager::Composite()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ClientLayerManager::DidComposite()
|
||||
{
|
||||
MOZ_ASSERT(mWidget);
|
||||
nsIWidgetListener *listener = mWidget->GetWidgetListener();
|
||||
if (listener) {
|
||||
listener->DidCompositeWindow();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ClientLayerManager::MakeSnapshotIfRequired()
|
||||
{
|
||||
|
@ -154,8 +154,6 @@ public:
|
||||
|
||||
virtual void Composite() MOZ_OVERRIDE;
|
||||
|
||||
virtual void DidComposite();
|
||||
|
||||
protected:
|
||||
enum TransactionPhase {
|
||||
PHASE_NONE, PHASE_CONSTRUCTION, PHASE_DRAWING, PHASE_FORWARD
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc
|
||||
#include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop, etc
|
||||
#include "FrameLayerBuilder.h"
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
|
||||
using mozilla::layers::LayerTransactionChild;
|
||||
|
||||
@ -121,21 +120,6 @@ CompositorChild::RecvInvalidateAll()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CompositorChild::RecvDidComposite(const uint64_t& aId)
|
||||
{
|
||||
if (mLayerManager) {
|
||||
MOZ_ASSERT(aId == 0);
|
||||
mLayerManager->DidComposite();
|
||||
} else if (aId != 0) {
|
||||
dom::TabChild *child = dom::TabChild::GetFrom(aId);
|
||||
if (child) {
|
||||
child->DidComposite();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CompositorChild::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
|
@ -57,8 +57,6 @@ public:
|
||||
|
||||
virtual bool RecvInvalidateAll() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool RecvDidComposite(const uint64_t& aId) MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual PLayerTransactionChild*
|
||||
AllocPLayerTransactionChild(const nsTArray<LayersBackend>& aBackendHints,
|
||||
|
@ -50,7 +50,6 @@
|
||||
#endif
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/ipc/ProtocolTypes.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
using namespace base;
|
||||
using namespace mozilla;
|
||||
@ -660,8 +659,6 @@ CompositorParent::CompositeToTarget(DrawTarget* aTarget)
|
||||
mLayerManager->SetDebugOverlayWantsNextFrame(false);
|
||||
mLayerManager->EndEmptyTransaction();
|
||||
|
||||
DidComposite();
|
||||
|
||||
if (mLayerManager->DebugOverlayWantsNextFrame()) {
|
||||
ScheduleComposition();
|
||||
}
|
||||
@ -682,21 +679,6 @@ CompositorParent::CompositeToTarget(DrawTarget* aTarget)
|
||||
profiler_tracing("Paint", "Composite", TRACING_INTERVAL_END);
|
||||
}
|
||||
|
||||
void
|
||||
CompositorParent::DidComposite()
|
||||
{
|
||||
unused << SendDidComposite(0);
|
||||
|
||||
for (LayerTreeMap::iterator it = sIndirectLayerTrees.begin();
|
||||
it != sIndirectLayerTrees.end(); it++)
|
||||
{
|
||||
LayerTreeState* lts = &it->second;
|
||||
if (lts->mParent == this && lts->mCrossProcessParent) {
|
||||
unused << lts->mCrossProcessParent->SendDidComposite(it->first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CompositorParent::ForceComposeToTarget(DrawTarget* aTarget)
|
||||
{
|
||||
|
@ -297,8 +297,6 @@ private:
|
||||
*/
|
||||
bool CanComposite();
|
||||
|
||||
void DidComposite();
|
||||
|
||||
nsRefPtr<LayerManagerComposite> mLayerManager;
|
||||
nsRefPtr<Compositor> mCompositor;
|
||||
RefPtr<AsyncCompositionManager> mCompositionManager;
|
||||
|
@ -40,11 +40,6 @@ child:
|
||||
// The child should invalidate everything so that the whole window is redrawn.
|
||||
async InvalidateAll();
|
||||
|
||||
// The compositor completed a layers transaction. id is the layers id
|
||||
// of the child layer tree that was composited (or 0 when notifying
|
||||
// the root layer tree).
|
||||
async DidComposite(uint64_t id);
|
||||
|
||||
parent:
|
||||
|
||||
// The child is about to be destroyed, so perform any necessary cleanup.
|
||||
|
@ -5835,7 +5835,11 @@ PresShell::Paint(nsView* aViewToPaint,
|
||||
NS_ASSERTION(layerManager, "Must be in paint event");
|
||||
bool shouldInvalidate = layerManager->NeedsWidgetInvalidation();
|
||||
|
||||
nsAutoNotifyDidPaint notifyDidPaint(this, aFlags);
|
||||
uint32_t didPaintFlags = aFlags;
|
||||
if (!shouldInvalidate) {
|
||||
didPaintFlags |= PAINT_COMPOSITE;
|
||||
}
|
||||
nsAutoNotifyDidPaint notifyDidPaint(this, didPaintFlags);
|
||||
AutoUpdateHitRegion updateHitRegion(this, frame);
|
||||
|
||||
// Whether or not we should set first paint when painting is
|
||||
|
@ -370,7 +370,6 @@ public:
|
||||
virtual void WillPaintWindow(nsIWidget* aWidget) MOZ_OVERRIDE;
|
||||
virtual bool PaintWindow(nsIWidget* aWidget, nsIntRegion aRegion) MOZ_OVERRIDE;
|
||||
virtual void DidPaintWindow() MOZ_OVERRIDE;
|
||||
virtual void DidCompositeWindow() MOZ_OVERRIDE;
|
||||
virtual void RequestRepaint() MOZ_OVERRIDE;
|
||||
virtual nsEventStatus HandleEvent(mozilla::WidgetGUIEvent* aEvent,
|
||||
bool aUseAttachedEvents) MOZ_OVERRIDE;
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "nsPresArena.h"
|
||||
#include "nsXULPopupManager.h"
|
||||
#include "nsIWidgetListener.h"
|
||||
#include "nsContentUtils.h" // for nsAutoScriptBlocker
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@ -1055,16 +1054,6 @@ nsView::DidPaintWindow()
|
||||
vm->DidPaintWindow();
|
||||
}
|
||||
|
||||
void
|
||||
nsView::DidCompositeWindow()
|
||||
{
|
||||
nsIPresShell* presShell = mViewManager->GetPresShell();
|
||||
if (presShell) {
|
||||
nsAutoScriptBlocker scriptBlocker;
|
||||
presShell->GetPresContext()->NotifyDidPaintForSubtree(nsIPresShell::PAINT_COMPOSITE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsView::RequestRepaint()
|
||||
{
|
||||
|
@ -130,8 +130,6 @@ public:
|
||||
*/
|
||||
virtual void DidPaintWindow();
|
||||
|
||||
virtual void DidCompositeWindow();
|
||||
|
||||
/**
|
||||
* Request that layout schedules a repaint on the next refresh driver tick.
|
||||
*/
|
||||
|
@ -101,11 +101,6 @@ nsIWidgetListener::DidPaintWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
nsIWidgetListener::DidCompositeWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
nsIWidgetListener::RequestRepaint()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user