mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out 530555a2d6d4 (bug 1162064) for debug b2g emulator assertions and failure to thrive
CLOSED TREE
This commit is contained in:
parent
b17f382917
commit
881f3ba8cc
@ -13858,14 +13858,7 @@ nsDocShell::GetAppManifestURL(nsAString& aAppManifestURL)
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDocShell::GetAsyncPanZoomEnabled(bool* aOut)
|
nsDocShell::GetAsyncPanZoomEnabled(bool* aOut)
|
||||||
{
|
{
|
||||||
if (nsIPresShell* presShell = GetPresShell()) {
|
*aOut = Preferences::GetBool("layers.async-pan-zoom.enabled", false);
|
||||||
if (layers::LayerManager* lm = presShell->GetLayerManager()) {
|
|
||||||
*aOut = lm->AsyncPanZoomEnabled();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*aOut = false;
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,12 +375,9 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
|
|||||||
new DisplayPortPropertyData(displayport, aPriority),
|
new DisplayPortPropertyData(displayport, aPriority),
|
||||||
nsINode::DeleteProperty<DisplayPortPropertyData>);
|
nsINode::DeleteProperty<DisplayPortPropertyData>);
|
||||||
|
|
||||||
if (gfxPrefs::LayoutUseContainersForRootFrames()) {
|
if (nsLayoutUtils::UsesAsyncScrolling() && gfxPrefs::LayoutUseContainersForRootFrames()) {
|
||||||
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
|
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
|
||||||
if (rootScrollFrame &&
|
if (rootScrollFrame && content == rootScrollFrame->GetContent()) {
|
||||||
content == rootScrollFrame->GetContent() &&
|
|
||||||
nsLayoutUtils::UsesAsyncScrolling(rootScrollFrame))
|
|
||||||
{
|
|
||||||
// We are setting a root displayport for a document.
|
// We are setting a root displayport for a document.
|
||||||
// The pres shell needs a special flag set.
|
// The pres shell needs a special flag set.
|
||||||
presShell->SetIgnoreViewportScrolling(true);
|
presShell->SetIgnoreViewportScrolling(true);
|
||||||
@ -861,7 +858,7 @@ nsDOMWindowUtils::SendWheelEvent(float aX,
|
|||||||
|
|
||||||
widget->DispatchAPZAwareEvent(&wheelEvent);
|
widget->DispatchAPZAwareEvent(&wheelEvent);
|
||||||
|
|
||||||
if (widget->AsyncPanZoomEnabled()) {
|
if (gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
// Computing overflow deltas is not compatible with APZ, so if APZ is
|
// Computing overflow deltas is not compatible with APZ, so if APZ is
|
||||||
// enabled, we skip testing it.
|
// enabled, we skip testing it.
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -515,8 +515,7 @@ parent:
|
|||||||
|
|
||||||
sync GetRenderFrameInfo(PRenderFrame aRenderFrame)
|
sync GetRenderFrameInfo(PRenderFrame aRenderFrame)
|
||||||
returns (TextureFactoryIdentifier textureFactoryIdentifier,
|
returns (TextureFactoryIdentifier textureFactoryIdentifier,
|
||||||
uint64_t layersId,
|
uint64_t layersId);
|
||||||
bool asyncPanZoomEnabled);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sent by the child to the parent to inform it that an update to the
|
* Sent by the child to the parent to inform it that an update to the
|
||||||
@ -546,8 +545,7 @@ child:
|
|||||||
TextureFactoryIdentifier textureFactoryIdentifier,
|
TextureFactoryIdentifier textureFactoryIdentifier,
|
||||||
uint64_t layersId,
|
uint64_t layersId,
|
||||||
nullable PRenderFrame renderFrame,
|
nullable PRenderFrame renderFrame,
|
||||||
bool parentIsActive,
|
bool parentIsActive);
|
||||||
bool asyncPanZoomEnabled);
|
|
||||||
|
|
||||||
LoadURL(nsCString uri, BrowserConfiguration config);
|
LoadURL(nsCString uri, BrowserConfiguration config);
|
||||||
|
|
||||||
|
@ -268,8 +268,7 @@ CSSToParentLayerScale ConvertScaleForRoot(CSSToScreenScale aScale) {
|
|||||||
bool
|
bool
|
||||||
TabChildBase::HandlePossibleViewportChange(const ScreenIntSize& aOldScreenSize)
|
TabChildBase::HandlePossibleViewportChange(const ScreenIntSize& aOldScreenSize)
|
||||||
{
|
{
|
||||||
nsIWidget* widget = WebWidget();
|
if (!gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
if (!widget || !widget->AsyncPanZoomEnabled()) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -876,7 +875,6 @@ TabChild::TabChild(nsIContentChild* aManager,
|
|||||||
, mDefaultScale(0)
|
, mDefaultScale(0)
|
||||||
, mIPCOpen(true)
|
, mIPCOpen(true)
|
||||||
, mParentIsActive(false)
|
, mParentIsActive(false)
|
||||||
, mAsyncPanZoomEnabled(false)
|
|
||||||
{
|
{
|
||||||
// preloaded TabChild should not be added to child map
|
// preloaded TabChild should not be added to child map
|
||||||
if (mUniqueId) {
|
if (mUniqueId) {
|
||||||
@ -923,7 +921,7 @@ TabChild::Observe(nsISupports *aSubject,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!strcmp(aTopic, BEFORE_FIRST_PAINT)) {
|
} else if (!strcmp(aTopic, BEFORE_FIRST_PAINT)) {
|
||||||
if (AsyncPanZoomEnabled()) {
|
if (gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
nsCOMPtr<nsIDocument> subject(do_QueryInterface(aSubject));
|
nsCOMPtr<nsIDocument> subject(do_QueryInterface(aSubject));
|
||||||
nsCOMPtr<nsIDocument> doc(GetDocument());
|
nsCOMPtr<nsIDocument> doc(GetDocument());
|
||||||
|
|
||||||
@ -981,7 +979,7 @@ TabChild::OnLocationChange(nsIWebProgress* aWebProgress,
|
|||||||
nsIURI *aLocation,
|
nsIURI *aLocation,
|
||||||
uint32_t aFlags)
|
uint32_t aFlags)
|
||||||
{
|
{
|
||||||
if (!AsyncPanZoomEnabled()) {
|
if (!gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1539,11 +1537,9 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener,
|
|||||||
TextureFactoryIdentifier textureFactoryIdentifier;
|
TextureFactoryIdentifier textureFactoryIdentifier;
|
||||||
uint64_t layersId = 0;
|
uint64_t layersId = 0;
|
||||||
PRenderFrameChild* renderFrame = newChild->SendPRenderFrameConstructor();
|
PRenderFrameChild* renderFrame = newChild->SendPRenderFrameConstructor();
|
||||||
bool asyncPanZoomEnabled = false;
|
|
||||||
newChild->SendGetRenderFrameInfo(renderFrame,
|
newChild->SendGetRenderFrameInfo(renderFrame,
|
||||||
&textureFactoryIdentifier,
|
&textureFactoryIdentifier,
|
||||||
&layersId,
|
&layersId);
|
||||||
&asyncPanZoomEnabled);
|
|
||||||
if (layersId == 0) { // if renderFrame is invalid.
|
if (layersId == 0) { // if renderFrame is invalid.
|
||||||
PRenderFrameChild::Send__delete__(renderFrame);
|
PRenderFrameChild::Send__delete__(renderFrame);
|
||||||
renderFrame = nullptr;
|
renderFrame = nullptr;
|
||||||
@ -1551,8 +1547,7 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener,
|
|||||||
|
|
||||||
// Unfortunately we don't get a window unless we've shown the frame. That's
|
// Unfortunately we don't get a window unless we've shown the frame. That's
|
||||||
// pretty bogus; see bug 763602.
|
// pretty bogus; see bug 763602.
|
||||||
newChild->DoFakeShow(textureFactoryIdentifier, layersId, renderFrame,
|
newChild->DoFakeShow(textureFactoryIdentifier, layersId, renderFrame);
|
||||||
asyncPanZoomEnabled);
|
|
||||||
|
|
||||||
for (size_t i = 0; i < frameScripts.Length(); i++) {
|
for (size_t i = 0; i < frameScripts.Length(); i++) {
|
||||||
FrameScriptInfo& info = frameScripts[i];
|
FrameScriptInfo& info = frameScripts[i];
|
||||||
@ -1880,12 +1875,11 @@ TabChild::CancelCachedFileDescriptorCallback(
|
|||||||
void
|
void
|
||||||
TabChild::DoFakeShow(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
TabChild::DoFakeShow(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
||||||
const uint64_t& aLayersId,
|
const uint64_t& aLayersId,
|
||||||
PRenderFrameChild* aRenderFrame,
|
PRenderFrameChild* aRenderFrame)
|
||||||
bool aAsyncPanZoomEnabled)
|
|
||||||
{
|
{
|
||||||
ShowInfo info(EmptyString(), false, false, 0, 0);
|
ShowInfo info(EmptyString(), false, false, 0, 0);
|
||||||
RecvShow(ScreenIntSize(0, 0), info, aTextureFactoryIdentifier,
|
RecvShow(ScreenIntSize(0, 0), info, aTextureFactoryIdentifier,
|
||||||
aLayersId, aRenderFrame, mParentIsActive, aAsyncPanZoomEnabled);
|
aLayersId, aRenderFrame, mParentIsActive);
|
||||||
mDidFakeShow = true;
|
mDidFakeShow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1987,8 +1981,7 @@ TabChild::RecvShow(const ScreenIntSize& aSize,
|
|||||||
const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
||||||
const uint64_t& aLayersId,
|
const uint64_t& aLayersId,
|
||||||
PRenderFrameChild* aRenderFrame,
|
PRenderFrameChild* aRenderFrame,
|
||||||
const bool& aParentIsActive,
|
const bool& aParentIsActive)
|
||||||
const bool& aAsyncPanZoomEnabled)
|
|
||||||
{
|
{
|
||||||
MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame));
|
MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame));
|
||||||
|
|
||||||
@ -2021,8 +2014,6 @@ TabChild::RecvShow(const ScreenIntSize& aSize,
|
|||||||
bool res = InitTabChildGlobal();
|
bool res = InitTabChildGlobal();
|
||||||
ApplyShowInfo(aInfo);
|
ApplyShowInfo(aInfo);
|
||||||
RecvParentActivated(aParentIsActive);
|
RecvParentActivated(aParentIsActive);
|
||||||
|
|
||||||
mAsyncPanZoomEnabled = aAsyncPanZoomEnabled;
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2208,7 +2199,7 @@ TabChild::RecvMouseWheelEvent(const WidgetWheelEvent& aEvent,
|
|||||||
const ScrollableLayerGuid& aGuid,
|
const ScrollableLayerGuid& aGuid,
|
||||||
const uint64_t& aInputBlockId)
|
const uint64_t& aInputBlockId)
|
||||||
{
|
{
|
||||||
if (AsyncPanZoomEnabled()) {
|
if (gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
nsCOMPtr<nsIDocument> document(GetDocument());
|
nsCOMPtr<nsIDocument> document(GetDocument());
|
||||||
APZCCallbackHelper::SendSetTargetAPZCNotification(WebWidget(), document, aEvent, aGuid,
|
APZCCallbackHelper::SendSetTargetAPZCNotification(WebWidget(), document, aEvent, aGuid,
|
||||||
aInputBlockId);
|
aInputBlockId);
|
||||||
@ -2218,7 +2209,7 @@ TabChild::RecvMouseWheelEvent(const WidgetWheelEvent& aEvent,
|
|||||||
event.widget = mWidget;
|
event.widget = mWidget;
|
||||||
APZCCallbackHelper::DispatchWidgetEvent(event);
|
APZCCallbackHelper::DispatchWidgetEvent(event);
|
||||||
|
|
||||||
if (AsyncPanZoomEnabled()) {
|
if (gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
mAPZEventState->ProcessWheelEvent(event, aGuid, aInputBlockId);
|
mAPZEventState->ProcessWheelEvent(event, aGuid, aInputBlockId);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -2400,7 +2391,7 @@ TabChild::RecvRealTouchEvent(const WidgetTouchEvent& aEvent,
|
|||||||
APZCCallbackHelper::ApplyCallbackTransform(localEvent, aGuid,
|
APZCCallbackHelper::ApplyCallbackTransform(localEvent, aGuid,
|
||||||
mWidget->GetDefaultScale(), GetPresShellResolution());
|
mWidget->GetDefaultScale(), GetPresShellResolution());
|
||||||
|
|
||||||
if (localEvent.message == NS_TOUCH_START && AsyncPanZoomEnabled()) {
|
if (localEvent.message == NS_TOUCH_START && gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
if (gfxPrefs::TouchActionEnabled()) {
|
if (gfxPrefs::TouchActionEnabled()) {
|
||||||
APZCCallbackHelper::SendSetAllowedTouchBehaviorNotification(WebWidget(),
|
APZCCallbackHelper::SendSetAllowedTouchBehaviorNotification(WebWidget(),
|
||||||
localEvent, aInputBlockId, mSetAllowedTouchBehaviorCallback);
|
localEvent, aInputBlockId, mSetAllowedTouchBehaviorCallback);
|
||||||
@ -2413,7 +2404,7 @@ TabChild::RecvRealTouchEvent(const WidgetTouchEvent& aEvent,
|
|||||||
// Dispatch event to content (potentially a long-running operation)
|
// Dispatch event to content (potentially a long-running operation)
|
||||||
nsEventStatus status = APZCCallbackHelper::DispatchWidgetEvent(localEvent);
|
nsEventStatus status = APZCCallbackHelper::DispatchWidgetEvent(localEvent);
|
||||||
|
|
||||||
if (!AsyncPanZoomEnabled()) {
|
if (!gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
UpdateTapState(localEvent, status);
|
UpdateTapState(localEvent, status);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -319,8 +319,7 @@ public:
|
|||||||
const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
||||||
const uint64_t& aLayersId,
|
const uint64_t& aLayersId,
|
||||||
PRenderFrameChild* aRenderFrame,
|
PRenderFrameChild* aRenderFrame,
|
||||||
const bool& aParentIsActive,
|
const bool& aParentIsActive) override;
|
||||||
const bool& aAsyncPanZoomEnabled) override;
|
|
||||||
virtual bool RecvUpdateDimensions(const nsIntRect& rect,
|
virtual bool RecvUpdateDimensions(const nsIntRect& rect,
|
||||||
const ScreenIntSize& size,
|
const ScreenIntSize& size,
|
||||||
const ScreenOrientation& orientation,
|
const ScreenOrientation& orientation,
|
||||||
@ -505,7 +504,6 @@ public:
|
|||||||
{
|
{
|
||||||
return mParentIsActive;
|
return mParentIsActive;
|
||||||
}
|
}
|
||||||
bool AsyncPanZoomEnabled() { return mAsyncPanZoomEnabled; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~TabChild();
|
virtual ~TabChild();
|
||||||
@ -562,8 +560,7 @@ private:
|
|||||||
// Call RecvShow(nsIntSize(0, 0)) and block future calls to RecvShow().
|
// Call RecvShow(nsIntSize(0, 0)) and block future calls to RecvShow().
|
||||||
void DoFakeShow(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
void DoFakeShow(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
||||||
const uint64_t& aLayersId,
|
const uint64_t& aLayersId,
|
||||||
PRenderFrameChild* aRenderFrame,
|
PRenderFrameChild* aRenderFrame);
|
||||||
bool aAsyncPanZoomEnabled);
|
|
||||||
|
|
||||||
void ApplyShowInfo(const ShowInfo& aInfo);
|
void ApplyShowInfo(const ShowInfo& aInfo);
|
||||||
|
|
||||||
@ -643,7 +640,6 @@ private:
|
|||||||
double mDefaultScale;
|
double mDefaultScale;
|
||||||
bool mIPCOpen;
|
bool mIPCOpen;
|
||||||
bool mParentIsActive;
|
bool mParentIsActive;
|
||||||
bool mAsyncPanZoomEnabled;
|
|
||||||
|
|
||||||
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
|
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
|
||||||
};
|
};
|
||||||
|
@ -888,8 +888,7 @@ TabParent::Show(const ScreenIntSize& size, bool aParentIsActive)
|
|||||||
}
|
}
|
||||||
|
|
||||||
unused << SendShow(size, info, textureFactoryIdentifier,
|
unused << SendShow(size, info, textureFactoryIdentifier,
|
||||||
layersId, renderFrame, aParentIsActive,
|
layersId, renderFrame, aParentIsActive);
|
||||||
AsyncPanZoomEnabled());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -2649,15 +2648,12 @@ TabParent::DeallocPRenderFrameParent(PRenderFrameParent* aFrame)
|
|||||||
bool
|
bool
|
||||||
TabParent::RecvGetRenderFrameInfo(PRenderFrameParent* aRenderFrame,
|
TabParent::RecvGetRenderFrameInfo(PRenderFrameParent* aRenderFrame,
|
||||||
TextureFactoryIdentifier* aTextureFactoryIdentifier,
|
TextureFactoryIdentifier* aTextureFactoryIdentifier,
|
||||||
uint64_t* aLayersId,
|
uint64_t* aLayersId)
|
||||||
bool* aAsyncPanZoomEnabled)
|
|
||||||
{
|
{
|
||||||
RenderFrameParent* renderFrame = static_cast<RenderFrameParent*>(aRenderFrame);
|
RenderFrameParent* renderFrame = static_cast<RenderFrameParent*>(aRenderFrame);
|
||||||
renderFrame->GetTextureFactoryIdentifier(aTextureFactoryIdentifier);
|
renderFrame->GetTextureFactoryIdentifier(aTextureFactoryIdentifier);
|
||||||
*aLayersId = renderFrame->GetLayersId();
|
*aLayersId = renderFrame->GetLayersId();
|
||||||
|
|
||||||
*aAsyncPanZoomEnabled = AsyncPanZoomEnabled();
|
|
||||||
|
|
||||||
if (mNeedLayerTreeReadyNotification) {
|
if (mNeedLayerTreeReadyNotification) {
|
||||||
RequestNotifyLayerTreeReady();
|
RequestNotifyLayerTreeReady();
|
||||||
mNeedLayerTreeReadyNotification = false;
|
mNeedLayerTreeReadyNotification = false;
|
||||||
@ -2735,7 +2731,7 @@ TabParent::ApzAwareEventRoutingToChild(ScrollableLayerGuid* aOutTargetGuid,
|
|||||||
uint64_t* aOutInputBlockId,
|
uint64_t* aOutInputBlockId,
|
||||||
nsEventStatus* aOutApzResponse)
|
nsEventStatus* aOutApzResponse)
|
||||||
{
|
{
|
||||||
if (AsyncPanZoomEnabled()) {
|
if (gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
if (aOutTargetGuid) {
|
if (aOutTargetGuid) {
|
||||||
*aOutTargetGuid = InputAPZContext::GetTargetLayerGuid();
|
*aOutTargetGuid = InputAPZContext::GetTargetLayerGuid();
|
||||||
|
|
||||||
@ -2915,7 +2911,7 @@ TabParent::InjectTouchEvent(const nsAString& aType,
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
TabParent::GetUseAsyncPanZoom(bool* useAsyncPanZoom)
|
TabParent::GetUseAsyncPanZoom(bool* useAsyncPanZoom)
|
||||||
{
|
{
|
||||||
*useAsyncPanZoom = AsyncPanZoomEnabled();
|
*useAsyncPanZoom = gfxPrefs::AsyncPanZoomEnabled();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3322,13 +3318,6 @@ TabParent::TakeDragVisualization(RefPtr<mozilla::gfx::SourceSurface>& aSurface,
|
|||||||
aDragAreaY = mDragAreaY;
|
aDragAreaY = mDragAreaY;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
TabParent::AsyncPanZoomEnabled() const
|
|
||||||
{
|
|
||||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
|
||||||
return widget && widget->AsyncPanZoomEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
FakeChannel::OnAuthAvailable(nsISupports *aContext, nsIAuthInformation *aAuthInfo)
|
FakeChannel::OnAuthAvailable(nsISupports *aContext, nsIAuthInformation *aAuthInfo)
|
||||||
{
|
{
|
||||||
|
@ -448,8 +448,7 @@ protected:
|
|||||||
|
|
||||||
virtual bool RecvGetRenderFrameInfo(PRenderFrameParent* aRenderFrame,
|
virtual bool RecvGetRenderFrameInfo(PRenderFrameParent* aRenderFrame,
|
||||||
TextureFactoryIdentifier* aTextureFactoryIdentifier,
|
TextureFactoryIdentifier* aTextureFactoryIdentifier,
|
||||||
uint64_t* aLayersId,
|
uint64_t* aLayersId) override;
|
||||||
bool* aAsyncPanZoomEnabled) override;
|
|
||||||
|
|
||||||
virtual bool RecvSetDimensions(const uint32_t& aFlags,
|
virtual bool RecvSetDimensions(const uint32_t& aFlags,
|
||||||
const int32_t& aX, const int32_t& aY,
|
const int32_t& aX, const int32_t& aY,
|
||||||
@ -501,8 +500,6 @@ private:
|
|||||||
|
|
||||||
CSSPoint AdjustTapToChildWidget(const CSSPoint& aPoint);
|
CSSPoint AdjustTapToChildWidget(const CSSPoint& aPoint);
|
||||||
|
|
||||||
bool AsyncPanZoomEnabled() const;
|
|
||||||
|
|
||||||
// Update state prior to routing an APZ-aware event to the child process.
|
// Update state prior to routing an APZ-aware event to the child process.
|
||||||
// |aOutTargetGuid| will contain the identifier
|
// |aOutTargetGuid| will contain the identifier
|
||||||
// of the APZC instance that handled the event. aOutTargetGuid may be null.
|
// of the APZC instance that handled the event. aOutTargetGuid may be null.
|
||||||
|
@ -669,10 +669,6 @@ public:
|
|||||||
return mAnimationReadyTime;
|
return mAnimationReadyTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool AsyncPanZoomEnabled() const {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsRefPtr<Layer> mRoot;
|
nsRefPtr<Layer> mRoot;
|
||||||
gfx::UserData mUserData;
|
gfx::UserData mUserData;
|
||||||
|
@ -213,7 +213,7 @@ ClientLayerManager::BeginTransactionWithTarget(gfxContext* aTarget)
|
|||||||
// platforms.
|
// platforms.
|
||||||
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
|
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
|
||||||
if (mWidget && mWidget->GetOwningTabChild()) {
|
if (mWidget && mWidget->GetOwningTabChild()) {
|
||||||
mCompositorMightResample = AsyncPanZoomEnabled();
|
mCompositorMightResample = gfxPrefs::AsyncPanZoomEnabled();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -782,12 +782,6 @@ ClientLayerManager::ProgressiveUpdateCallback(bool aHasPendingNewThebesContent,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
ClientLayerManager::AsyncPanZoomEnabled() const
|
|
||||||
{
|
|
||||||
return mWidget && mWidget->AsyncPanZoomEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
ClientLayer::~ClientLayer()
|
ClientLayer::~ClientLayer()
|
||||||
{
|
{
|
||||||
if (HasShadow()) {
|
if (HasShadow()) {
|
||||||
|
@ -250,9 +250,6 @@ public:
|
|||||||
void SetTransactionIdAllocator(TransactionIdAllocator* aAllocator) { mTransactionIdAllocator = aAllocator; }
|
void SetTransactionIdAllocator(TransactionIdAllocator* aAllocator) { mTransactionIdAllocator = aAllocator; }
|
||||||
|
|
||||||
float RequestProperty(const nsAString& aProperty) override;
|
float RequestProperty(const nsAString& aProperty) override;
|
||||||
|
|
||||||
bool AsyncPanZoomEnabled() const override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum TransactionPhase {
|
enum TransactionPhase {
|
||||||
PHASE_NONE, PHASE_CONSTRUCTION, PHASE_DRAWING, PHASE_FORWARD
|
PHASE_NONE, PHASE_CONSTRUCTION, PHASE_DRAWING, PHASE_FORWARD
|
||||||
|
@ -257,7 +257,7 @@ ClientTiledPaintedLayer::UseProgressiveDraw() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ClientManager()->AsyncPanZoomEnabled()) {
|
if (gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
LayerMetricsWrapper scrollAncestor;
|
LayerMetricsWrapper scrollAncestor;
|
||||||
GetAncestorLayers(&scrollAncestor, nullptr, nullptr);
|
GetAncestorLayers(&scrollAncestor, nullptr, nullptr);
|
||||||
MOZ_ASSERT(scrollAncestor); // because mPaintData.mCriticalDisplayPort is non-empty
|
MOZ_ASSERT(scrollAncestor); // because mPaintData.mCriticalDisplayPort is non-empty
|
||||||
|
@ -1329,12 +1329,6 @@ LayerComposite::SetLayerManager(LayerManagerComposite* aManager)
|
|||||||
mCompositor = aManager->GetCompositor();
|
mCompositor = aManager->GetCompositor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
LayerManagerComposite::AsyncPanZoomEnabled() const
|
|
||||||
{
|
|
||||||
return mCompositor->GetWidget()->AsyncPanZoomEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIntRegion
|
nsIntRegion
|
||||||
LayerComposite::GetFullyRenderedRegion() {
|
LayerComposite::GetFullyRenderedRegion() {
|
||||||
if (TiledLayerComposer* tiled = GetTiledLayerComposer()) {
|
if (TiledLayerComposer* tiled = GetTiledLayerComposer()) {
|
||||||
|
@ -249,8 +249,6 @@ public:
|
|||||||
|
|
||||||
bool LastFrameMissedHWC() { return mLastFrameMissedHWC; }
|
bool LastFrameMissedHWC() { return mLastFrameMissedHWC; }
|
||||||
|
|
||||||
bool AsyncPanZoomEnabled() const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Region we're clipping our current drawing to. */
|
/** Region we're clipping our current drawing to. */
|
||||||
nsIntRegion mClippingRegion;
|
nsIntRegion mClippingRegion;
|
||||||
|
@ -662,9 +662,7 @@ CompositorParent::CompositorParent(nsIWidget* aWidget,
|
|||||||
sIndirectLayerTrees[mRootLayerTreeID].mParent = this;
|
sIndirectLayerTrees[mRootLayerTreeID].mParent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The Compositor uses the APZ pref directly since it needs to know whether
|
if (gfxPrefs::AsyncPanZoomEnabled() &&
|
||||||
// to attempt to create the APZ machinery at all.
|
|
||||||
if (gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly() &&
|
|
||||||
#if !defined(MOZ_B2G) && !defined(MOZ_WIDGET_ANDROID)
|
#if !defined(MOZ_B2G) && !defined(MOZ_WIDGET_ANDROID)
|
||||||
// For XUL applications (everything but B2G on mobile and desktop, and
|
// For XUL applications (everything but B2G on mobile and desktop, and
|
||||||
// Firefox on Android) we only want to use APZ when E10S is enabled. If
|
// Firefox on Android) we only want to use APZ when E10S is enabled. If
|
||||||
|
@ -2444,9 +2444,7 @@ DetectBadApzWheelInputPrefs()
|
|||||||
void
|
void
|
||||||
gfxPlatform::GetApzSupportInfo(mozilla::widget::InfoObject& aObj)
|
gfxPlatform::GetApzSupportInfo(mozilla::widget::InfoObject& aObj)
|
||||||
{
|
{
|
||||||
// This is only a diagnostic so we use the low-level pref to see whether
|
if (!gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
// C++ APZ is enabled at all.
|
|
||||||
if (!gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ private:
|
|||||||
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.print-histogram", FPSPrintHistogram, bool, false);
|
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.print-histogram", FPSPrintHistogram, bool, false);
|
||||||
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.write-to-file", WriteFPSToFile, bool, false);
|
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.write-to-file", WriteFPSToFile, bool, false);
|
||||||
DECL_GFX_PREF(Once, "layers.acceleration.force-enabled", LayersAccelerationForceEnabled, bool, false);
|
DECL_GFX_PREF(Once, "layers.acceleration.force-enabled", LayersAccelerationForceEnabled, bool, false);
|
||||||
DECL_GFX_PREF(Once, "layers.async-pan-zoom.enabled", AsyncPanZoomEnabledDoNotUseDirectly, bool, true);
|
DECL_GFX_PREF(Once, "layers.async-pan-zoom.enabled", AsyncPanZoomEnabled, bool, false);
|
||||||
DECL_GFX_PREF(Once, "layers.async-pan-zoom.separate-event-thread", AsyncPanZoomSeparateEventThread, bool, false);
|
DECL_GFX_PREF(Once, "layers.async-pan-zoom.separate-event-thread", AsyncPanZoomSeparateEventThread, bool, false);
|
||||||
DECL_GFX_PREF(Once, "layers.async-video.enabled", AsyncVideoEnabled, bool, true);
|
DECL_GFX_PREF(Once, "layers.async-video.enabled", AsyncVideoEnabled, bool, true);
|
||||||
DECL_GFX_PREF(Once, "layers.async-video-oop.enabled", AsyncVideoOOPEnabled, bool, true);
|
DECL_GFX_PREF(Once, "layers.async-video-oop.enabled", AsyncVideoOOPEnabled, bool, true);
|
||||||
|
@ -47,16 +47,11 @@ ComputeImageFlags(ImageURL* uri, const nsCString& aMimeType, bool isMultiPart)
|
|||||||
|
|
||||||
// We default to the static globals.
|
// We default to the static globals.
|
||||||
bool isDiscardable = gfxPrefs::ImageMemDiscardable();
|
bool isDiscardable = gfxPrefs::ImageMemDiscardable();
|
||||||
|
bool doDecodeOnlyOnDraw = gfxPrefs::ImageDecodeOnlyOnDrawEnabled() &&
|
||||||
|
gfxPrefs::AsyncPanZoomEnabled();
|
||||||
bool doDecodeImmediately = gfxPrefs::ImageDecodeImmediatelyEnabled();
|
bool doDecodeImmediately = gfxPrefs::ImageDecodeImmediatelyEnabled();
|
||||||
bool doDownscaleDuringDecode = gfxPrefs::ImageDownscaleDuringDecodeEnabled();
|
bool doDownscaleDuringDecode = gfxPrefs::ImageDownscaleDuringDecodeEnabled();
|
||||||
|
|
||||||
// We use the compositor APZ pref here since we don't have a widget to test.
|
|
||||||
// It's safe since this is an optimization, and the only platform
|
|
||||||
// ImageDecodeOnlyOnDraw is disabled on is B2G (where APZ is enabled in all
|
|
||||||
// widgets anyway).
|
|
||||||
bool doDecodeOnlyOnDraw = gfxPrefs::ImageDecodeOnlyOnDrawEnabled() &&
|
|
||||||
gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly();
|
|
||||||
|
|
||||||
// We want UI to be as snappy as possible and not to flicker. Disable
|
// We want UI to be as snappy as possible and not to flicker. Disable
|
||||||
// discarding and decode-only-on-draw for chrome URLS.
|
// discarding and decode-only-on-draw for chrome URLS.
|
||||||
bool isChrome = false;
|
bool isChrome = false;
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include "AccessibleCaretLogger.h"
|
#include "AccessibleCaretLogger.h"
|
||||||
#include "AccessibleCaretManager.h"
|
#include "AccessibleCaretManager.h"
|
||||||
#include "Layers.h"
|
|
||||||
#include "gfxPrefs.h"
|
#include "gfxPrefs.h"
|
||||||
#include "mozilla/MouseEvents.h"
|
#include "mozilla/MouseEvents.h"
|
||||||
#include "mozilla/TextEvents.h"
|
#include "mozilla/TextEvents.h"
|
||||||
@ -412,9 +411,7 @@ AccessibleCaretEventHub::Init(nsIPresShell* aPresShell)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MOZ_WIDGET_GONK)
|
#if defined(MOZ_WIDGET_GONK)
|
||||||
if (layers::LayerManager* lm = mPresShell->GetLayerManager()) {
|
mUseAsyncPanZoom = gfxPrefs::AsyncPanZoomEnabled();
|
||||||
mUseAsyncPanZoom = lm->AsyncPanZoomEnabled();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
docShell->AddWeakReflowObserver(this);
|
docShell->AddWeakReflowObserver(this);
|
||||||
|
@ -4751,7 +4751,7 @@ FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder* aBuilder,
|
|||||||
if ((aContainerFrame->GetStateBits() & NS_FRAME_NO_COMPONENT_ALPHA) &&
|
if ((aContainerFrame->GetStateBits() & NS_FRAME_NO_COMPONENT_ALPHA) &&
|
||||||
mRetainingManager &&
|
mRetainingManager &&
|
||||||
mRetainingManager->ShouldAvoidComponentAlphaLayers() &&
|
mRetainingManager->ShouldAvoidComponentAlphaLayers() &&
|
||||||
!nsLayoutUtils::AsyncPanZoomEnabled(aContainerFrame))
|
!gfxPrefs::AsyncPanZoomEnabled())
|
||||||
{
|
{
|
||||||
flattenToSingleLayer = true;
|
flattenToSingleLayer = true;
|
||||||
}
|
}
|
||||||
@ -4783,7 +4783,7 @@ FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder* aBuilder,
|
|||||||
mRetainingManager->ShouldAvoidComponentAlphaLayers() &&
|
mRetainingManager->ShouldAvoidComponentAlphaLayers() &&
|
||||||
containerLayer->HasMultipleChildren() &&
|
containerLayer->HasMultipleChildren() &&
|
||||||
!flattenToSingleLayer &&
|
!flattenToSingleLayer &&
|
||||||
!nsLayoutUtils::AsyncPanZoomEnabled(aContainerFrame))
|
!gfxPrefs::AsyncPanZoomEnabled())
|
||||||
{
|
{
|
||||||
// Since we don't want any component alpha layers on BasicLayers, we repeat
|
// Since we don't want any component alpha layers on BasicLayers, we repeat
|
||||||
// the layer building process with this explicitely forced off.
|
// the layer building process with this explicitely forced off.
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include "mozilla/dom/TreeWalker.h"
|
#include "mozilla/dom/TreeWalker.h"
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
#include "mozilla/TouchEvents.h"
|
#include "mozilla/TouchEvents.h"
|
||||||
#include "Layers.h"
|
|
||||||
#include "TouchCaret.h"
|
#include "TouchCaret.h"
|
||||||
#include "nsFrameSelection.h"
|
#include "nsFrameSelection.h"
|
||||||
|
|
||||||
@ -117,9 +116,7 @@ SelectionCarets::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MOZ_WIDGET_GONK)
|
#if defined(MOZ_WIDGET_GONK)
|
||||||
if (layers::LayerManager* lm = mPresShell->GetLayerManager()) {
|
mUseAsyncPanZoom = gfxPrefs::AsyncPanZoomEnabled();
|
||||||
mUseAsyncPanZoom = lm->AsyncPanZoomEnabled();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
docShell->AddWeakReflowObserver(this);
|
docShell->AddWeakReflowObserver(this);
|
||||||
|
@ -634,8 +634,7 @@ nsDisplayListBuilder::nsDisplayListBuilder(nsIFrame* aReferenceFrame,
|
|||||||
mHaveScrollableDisplayPort(false),
|
mHaveScrollableDisplayPort(false),
|
||||||
mWindowDraggingAllowed(false),
|
mWindowDraggingAllowed(false),
|
||||||
mIsBuildingForPopup(nsLayoutUtils::IsPopup(aReferenceFrame)),
|
mIsBuildingForPopup(nsLayoutUtils::IsPopup(aReferenceFrame)),
|
||||||
mForceLayerForScrollParent(false),
|
mForceLayerForScrollParent(false)
|
||||||
mAsyncPanZoomEnabled(nsLayoutUtils::AsyncPanZoomEnabled(aReferenceFrame))
|
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayListBuilder);
|
MOZ_COUNT_CTOR(nsDisplayListBuilder);
|
||||||
PL_InitArenaPool(&mPool, "displayListArena", 1024,
|
PL_InitArenaPool(&mPool, "displayListArena", 1024,
|
||||||
@ -2285,7 +2284,7 @@ nsDisplayBackgroundImage::ShouldFixToViewport(LayerManager* aManager)
|
|||||||
{
|
{
|
||||||
// APZ doesn't (yet) know how to scroll the visible region for these type of
|
// APZ doesn't (yet) know how to scroll the visible region for these type of
|
||||||
// items, so don't layerize them if it's enabled.
|
// items, so don't layerize them if it's enabled.
|
||||||
if (nsLayoutUtils::UsesAsyncScrolling(mFrame) ||
|
if (nsLayoutUtils::UsesAsyncScrolling() ||
|
||||||
(aManager && aManager->ShouldAvoidComponentAlphaLayers())) {
|
(aManager && aManager->ShouldAvoidComponentAlphaLayers())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -4210,7 +4209,7 @@ nsDisplaySubDocument::ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
|||||||
// If APZ is enabled then don't allow this computation to influence
|
// If APZ is enabled then don't allow this computation to influence
|
||||||
// aVisibleRegion, on the assumption that the layer can be asynchronously
|
// aVisibleRegion, on the assumption that the layer can be asynchronously
|
||||||
// scrolled so we'll definitely need all the content under it.
|
// scrolled so we'll definitely need all the content under it.
|
||||||
if (!nsLayoutUtils::UsesAsyncScrolling(mFrame)) {
|
if (!nsLayoutUtils::UsesAsyncScrolling()) {
|
||||||
bool snap;
|
bool snap;
|
||||||
nsRect bounds = GetBounds(aBuilder, &snap);
|
nsRect bounds = GetBounds(aBuilder, &snap);
|
||||||
nsRegion removed;
|
nsRegion removed;
|
||||||
|
@ -350,8 +350,8 @@ public:
|
|||||||
if (mMode == PAINTING) {
|
if (mMode == PAINTING) {
|
||||||
// Note: this is the only place that gets to query LayoutEventRegionsEnabled
|
// Note: this is the only place that gets to query LayoutEventRegionsEnabled
|
||||||
// 'directly' - other code should call this function.
|
// 'directly' - other code should call this function.
|
||||||
return gfxPrefs::LayoutEventRegionsEnabledDoNotUseDirectly() ||
|
return (gfxPrefs::LayoutEventRegionsEnabledDoNotUseDirectly() ||
|
||||||
mAsyncPanZoomEnabled;
|
gfxPrefs::AsyncPanZoomEnabled());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -976,7 +976,6 @@ private:
|
|||||||
bool mWindowDraggingAllowed;
|
bool mWindowDraggingAllowed;
|
||||||
bool mIsBuildingForPopup;
|
bool mIsBuildingForPopup;
|
||||||
bool mForceLayerForScrollParent;
|
bool mForceLayerForScrollParent;
|
||||||
bool mAsyncPanZoomEnabled;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class nsDisplayItem;
|
class nsDisplayItem;
|
||||||
|
@ -814,34 +814,6 @@ ApplyRectMultiplier(nsRect aRect, float aMultiplier)
|
|||||||
return nsRect(ceil(newX), ceil(newY), floor(newWidth), floor(newHeight));
|
return nsRect(ceil(newX), ceil(newY), floor(newWidth), floor(newHeight));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
nsLayoutUtils::UsesAsyncScrolling(nsIFrame* aFrame)
|
|
||||||
{
|
|
||||||
#ifdef MOZ_WIDGET_ANDROID
|
|
||||||
// We always have async scrolling for android
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return AsyncPanZoomEnabled(aFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
nsLayoutUtils::AsyncPanZoomEnabled(nsIFrame* aFrame)
|
|
||||||
{
|
|
||||||
// We use this as a shortcut, since if the compositor will never use APZ,
|
|
||||||
// no widget will either.
|
|
||||||
if (!gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIFrame *frame = nsLayoutUtils::GetDisplayRootFrame(aFrame);
|
|
||||||
nsIWidget* widget = frame->GetNearestWidget();
|
|
||||||
if (!widget) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return widget->AsyncPanZoomEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the maximum displayport size, based on the LayerManager's maximum
|
// Return the maximum displayport size, based on the LayerManager's maximum
|
||||||
// supported texture size. The result is in app units.
|
// supported texture size. The result is in app units.
|
||||||
static nscoord
|
static nscoord
|
||||||
@ -1113,12 +1085,9 @@ nsLayoutUtils::SetDisplayPortMargins(nsIContent* aContent,
|
|||||||
aMargins, aPriority),
|
aMargins, aPriority),
|
||||||
nsINode::DeleteProperty<DisplayPortMarginsPropertyData>);
|
nsINode::DeleteProperty<DisplayPortMarginsPropertyData>);
|
||||||
|
|
||||||
if (gfxPrefs::LayoutUseContainersForRootFrames()) {
|
if (nsLayoutUtils::UsesAsyncScrolling() && gfxPrefs::LayoutUseContainersForRootFrames()) {
|
||||||
nsIFrame* rootScrollFrame = aPresShell->GetRootScrollFrame();
|
nsIFrame* rootScrollFrame = aPresShell->GetRootScrollFrame();
|
||||||
if (rootScrollFrame &&
|
if (rootScrollFrame && aContent == rootScrollFrame->GetContent()) {
|
||||||
aContent == rootScrollFrame->GetContent() &&
|
|
||||||
nsLayoutUtils::UsesAsyncScrolling(rootScrollFrame))
|
|
||||||
{
|
|
||||||
// We are setting a root displayport for a document.
|
// We are setting a root displayport for a document.
|
||||||
// If we have APZ, then set a special flag on the pres shell so
|
// If we have APZ, then set a special flag on the pres shell so
|
||||||
// that we don't get scrollbars drawn.
|
// that we don't get scrollbars drawn.
|
||||||
@ -3006,7 +2975,7 @@ nsLayoutUtils::GetOrMaybeCreateDisplayPort(nsDisplayListBuilder& aBuilder,
|
|||||||
// Note: we only do this in processes where we do subframe scrolling to
|
// Note: we only do this in processes where we do subframe scrolling to
|
||||||
// begin with (i.e., not in the parent process on B2G).
|
// begin with (i.e., not in the parent process on B2G).
|
||||||
if (aBuilder.IsPaintingToWindow() &&
|
if (aBuilder.IsPaintingToWindow() &&
|
||||||
nsLayoutUtils::AsyncPanZoomEnabled(aScrollFrame) &&
|
gfxPrefs::AsyncPanZoomEnabled() &&
|
||||||
!aBuilder.HaveScrollableDisplayPort() &&
|
!aBuilder.HaveScrollableDisplayPort() &&
|
||||||
scrollableFrame->WantAsyncScroll()) {
|
scrollableFrame->WantAsyncScroll()) {
|
||||||
|
|
||||||
@ -7853,6 +7822,17 @@ nsLayoutUtils::CalculateExpandedScrollableRect(nsIFrame* aFrame)
|
|||||||
return scrollableRect;
|
return scrollableRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* static */ bool
|
||||||
|
nsLayoutUtils::UsesAsyncScrolling()
|
||||||
|
{
|
||||||
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
|
// We always have async scrolling for android
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return gfxPrefs::AsyncPanZoomEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
nsLayoutUtils::DoLogTestDataForPaint(LayerManager* aManager,
|
nsLayoutUtils::DoLogTestDataForPaint(LayerManager* aManager,
|
||||||
ViewID aScrollId,
|
ViewID aScrollId,
|
||||||
|
@ -2514,16 +2514,10 @@ public:
|
|||||||
CalculateExpandedScrollableRect(nsIFrame* aFrame);
|
CalculateExpandedScrollableRect(nsIFrame* aFrame);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the widget owning the given frame uses asynchronous
|
* Returns true if we're using asynchronous scrolling (either through
|
||||||
* scrolling.
|
* APZ or the android frontend).
|
||||||
*/
|
*/
|
||||||
static bool UsesAsyncScrolling(nsIFrame* aFrame);
|
static bool UsesAsyncScrolling();
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the widget owning the given frame has builtin APZ support
|
|
||||||
* enabled.
|
|
||||||
*/
|
|
||||||
static bool AsyncPanZoomEnabled(nsIFrame* aFrame);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a key/value pair for APZ testing during a paint.
|
* Log a key/value pair for APZ testing during a paint.
|
||||||
|
@ -11041,10 +11041,10 @@ nsIPresShell::RecomputeFontSizeInflationEnabled()
|
|||||||
|
|
||||||
// Force-enabling font inflation always trumps the heuristics here.
|
// Force-enabling font inflation always trumps the heuristics here.
|
||||||
if (!FontSizeInflationForceEnabled()) {
|
if (!FontSizeInflationForceEnabled()) {
|
||||||
if (TabChild* tab = TabChild::GetFrom(this)) {
|
if (TabChild::GetFrom(this)) {
|
||||||
// We're in a child process. Cancel inflation if we're not
|
// We're in a child process. Cancel inflation if we're not
|
||||||
// async-pan zoomed.
|
// async-pan zoomed.
|
||||||
if (!tab->AsyncPanZoomEnabled()) {
|
if (!gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
mFontSizeInflationEnabled = false;
|
mFontSizeInflationEnabled = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1824,7 +1824,7 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter,
|
|||||||
|
|
||||||
if (IsAlwaysActive() &&
|
if (IsAlwaysActive() &&
|
||||||
gfxPrefs::LayersTilesEnabled() &&
|
gfxPrefs::LayersTilesEnabled() &&
|
||||||
!nsLayoutUtils::UsesAsyncScrolling(mOuter) &&
|
!nsLayoutUtils::UsesAsyncScrolling() &&
|
||||||
mOuter->GetContent()) {
|
mOuter->GetContent()) {
|
||||||
// If we have tiling but no APZ, then set a 0-margin display port on
|
// If we have tiling but no APZ, then set a 0-margin display port on
|
||||||
// active scroll containers so that we paint by whole tile increments
|
// active scroll containers so that we paint by whole tile increments
|
||||||
@ -2028,7 +2028,7 @@ ScrollFrameHelper::ScrollToWithOrigin(nsPoint aScrollPosition,
|
|||||||
mAsyncScroll = nullptr;
|
mAsyncScroll = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nsLayoutUtils::AsyncPanZoomEnabled(mOuter)) {
|
if (gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
// The animation will be handled in the compositor, pass the
|
// The animation will be handled in the compositor, pass the
|
||||||
// information needed to start the animation and skip the main-thread
|
// information needed to start the animation and skip the main-thread
|
||||||
// animation for this scroll.
|
// animation for this scroll.
|
||||||
@ -2909,7 +2909,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
shouldBuildLayer = true;
|
shouldBuildLayer = true;
|
||||||
} else {
|
} else {
|
||||||
shouldBuildLayer =
|
shouldBuildLayer =
|
||||||
nsLayoutUtils::AsyncPanZoomEnabled(mOuter) &&
|
gfxPrefs::AsyncPanZoomEnabled() &&
|
||||||
WantAsyncScroll() &&
|
WantAsyncScroll() &&
|
||||||
// If we are using containers for root frames, and we are the root
|
// If we are using containers for root frames, and we are the root
|
||||||
// scroll frame for the display root, then we don't need a scroll
|
// scroll frame for the display root, then we don't need a scroll
|
||||||
@ -3051,7 +3051,7 @@ ScrollFrameHelper::ComputeFrameMetrics(Layer* aLayer,
|
|||||||
// above the first one on a given layer. They will be applied by the
|
// above the first one on a given layer. They will be applied by the
|
||||||
// compositor instead, with async transforms for the scrollframes interspersed
|
// compositor instead, with async transforms for the scrollframes interspersed
|
||||||
// between them.
|
// between them.
|
||||||
bool omitClip = nsLayoutUtils::AsyncPanZoomEnabled(mOuter) && aOutput->Length() > 0;
|
bool omitClip = gfxPrefs::AsyncPanZoomEnabled() && aOutput->Length() > 0;
|
||||||
if (!omitClip && (!gfxPrefs::LayoutUseContainersForRootFrames() || mAddClipRectToLayer)) {
|
if (!omitClip && (!gfxPrefs::LayoutUseContainersForRootFrames() || mAddClipRectToLayer)) {
|
||||||
nsRect clip = nsRect(mScrollPort.TopLeft() + toReferenceFrame,
|
nsRect clip = nsRect(mScrollPort.TopLeft() + toReferenceFrame,
|
||||||
nsLayoutUtils::CalculateCompositionSizeForFrame(mOuter));
|
nsLayoutUtils::CalculateCompositionSizeForFrame(mOuter));
|
||||||
@ -3355,8 +3355,7 @@ ScrollFrameHelper::ScrollBy(nsIntPoint aDelta,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (aUnit == nsIScrollableFrame::DEVICE_PIXELS &&
|
if (aUnit == nsIScrollableFrame::DEVICE_PIXELS &&
|
||||||
!nsLayoutUtils::AsyncPanZoomEnabled(mOuter))
|
!gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
{
|
|
||||||
// When APZ is disabled, we must track the velocity
|
// When APZ is disabled, we must track the velocity
|
||||||
// on the main thread; otherwise, the APZC will manage this.
|
// on the main thread; otherwise, the APZC will manage this.
|
||||||
mVelocityQueue.Sample(GetScrollPosition());
|
mVelocityQueue.Sample(GetScrollPosition());
|
||||||
|
@ -299,7 +299,6 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
|
|||||||
, mFrameLoader(aFrameLoader)
|
, mFrameLoader(aFrameLoader)
|
||||||
, mFrameLoaderDestroyed(false)
|
, mFrameLoaderDestroyed(false)
|
||||||
, mBackgroundColor(gfxRGBA(1, 1, 1))
|
, mBackgroundColor(gfxRGBA(1, 1, 1))
|
||||||
, mAsyncPanZoomEnabled(false)
|
|
||||||
{
|
{
|
||||||
*aSuccess = false;
|
*aSuccess = false;
|
||||||
if (!mFrameLoader) {
|
if (!mFrameLoader) {
|
||||||
@ -309,9 +308,6 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
|
|||||||
*aId = 0;
|
*aId = 0;
|
||||||
|
|
||||||
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
|
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
|
||||||
|
|
||||||
mAsyncPanZoomEnabled = lm && lm->AsyncPanZoomEnabled();
|
|
||||||
|
|
||||||
// Perhaps the document containing this frame currently has no presentation?
|
// Perhaps the document containing this frame currently has no presentation?
|
||||||
if (lm && lm->GetBackendType() == LayersBackend::LAYERS_CLIENT) {
|
if (lm && lm->GetBackendType() == LayersBackend::LAYERS_CLIENT) {
|
||||||
*aTextureFactoryIdentifier =
|
*aTextureFactoryIdentifier =
|
||||||
@ -329,7 +325,7 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
|
|||||||
static_cast<ClientLayerManager*>(lm.get());
|
static_cast<ClientLayerManager*>(lm.get());
|
||||||
clientManager->GetRemoteRenderer()->SendNotifyChildCreated(mLayersId);
|
clientManager->GetRemoteRenderer()->SendNotifyChildCreated(mLayersId);
|
||||||
}
|
}
|
||||||
if (mAsyncPanZoomEnabled) {
|
if (gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
mContentController = new RemoteContentController(this);
|
mContentController = new RemoteContentController(this);
|
||||||
CompositorParent::SetControllerForLayerTree(mLayersId, mContentController);
|
CompositorParent::SetControllerForLayerTree(mLayersId, mContentController);
|
||||||
}
|
}
|
||||||
@ -350,7 +346,7 @@ RenderFrameParent::GetApzcTreeManager()
|
|||||||
// created and the static getter knows which CompositorParent is
|
// created and the static getter knows which CompositorParent is
|
||||||
// instantiated with this layers ID. That's why try to fetch it when
|
// instantiated with this layers ID. That's why try to fetch it when
|
||||||
// we first need it and cache the result.
|
// we first need it and cache the result.
|
||||||
if (!mApzcTreeManager && mAsyncPanZoomEnabled) {
|
if (!mApzcTreeManager && gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
mApzcTreeManager = CompositorParent::GetAPZCTreeManager(mLayersId);
|
mApzcTreeManager = CompositorParent::GetAPZCTreeManager(mLayersId);
|
||||||
}
|
}
|
||||||
return mApzcTreeManager.get();
|
return mApzcTreeManager.get();
|
||||||
|
@ -151,8 +151,6 @@ private:
|
|||||||
gfxRGBA mBackgroundColor;
|
gfxRGBA mBackgroundColor;
|
||||||
|
|
||||||
nsRegion mTouchRegion;
|
nsRegion mTouchRegion;
|
||||||
|
|
||||||
bool mAsyncPanZoomEnabled;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace layout
|
} // namespace layout
|
||||||
|
@ -744,7 +744,7 @@ function BuildConditionSandbox(aURL) {
|
|||||||
sandbox.Mulet = gB2GisMulet;
|
sandbox.Mulet = gB2GisMulet;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sandbox.asyncPanZoom = gContainingWindow.document.docShell.asyncPanZoomEnabled;
|
sandbox.asyncPanZoom = prefs.getBoolPref("layers.async-pan-zoom.enabled");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
sandbox.asyncPanZoom = false;
|
sandbox.asyncPanZoom = false;
|
||||||
}
|
}
|
||||||
|
@ -354,7 +354,7 @@ PuppetWidget::DispatchInputEvent(WidgetInputEvent* aEvent)
|
|||||||
nsEventStatus
|
nsEventStatus
|
||||||
PuppetWidget::DispatchAPZAwareEvent(WidgetInputEvent* aEvent)
|
PuppetWidget::DispatchAPZAwareEvent(WidgetInputEvent* aEvent)
|
||||||
{
|
{
|
||||||
if (!AsyncPanZoomEnabled()) {
|
if (!gfxPrefs::AsyncPanZoomEnabled()) {
|
||||||
nsEventStatus status = nsEventStatus_eIgnore;
|
nsEventStatus status = nsEventStatus_eIgnore;
|
||||||
DispatchEvent(aEvent, status);
|
DispatchEvent(aEvent, status);
|
||||||
return status;
|
return status;
|
||||||
@ -493,12 +493,6 @@ PuppetWidget::SetConfirmedTargetAPZC(uint64_t aInputBlockId,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
PuppetWidget::AsyncPanZoomEnabled() const
|
|
||||||
{
|
|
||||||
return mTabChild && mTabChild->AsyncPanZoomEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP_(bool)
|
NS_IMETHODIMP_(bool)
|
||||||
PuppetWidget::ExecuteNativeKeyBinding(NativeKeyBindingsType aType,
|
PuppetWidget::ExecuteNativeKeyBinding(NativeKeyBindingsType aType,
|
||||||
const mozilla::WidgetKeyboardEvent& aEvent,
|
const mozilla::WidgetKeyboardEvent& aEvent,
|
||||||
|
@ -135,7 +135,6 @@ public:
|
|||||||
nsEventStatus DispatchInputEvent(WidgetInputEvent* aEvent) override;
|
nsEventStatus DispatchInputEvent(WidgetInputEvent* aEvent) override;
|
||||||
void SetConfirmedTargetAPZC(uint64_t aInputBlockId,
|
void SetConfirmedTargetAPZC(uint64_t aInputBlockId,
|
||||||
const nsTArray<ScrollableLayerGuid>& aTargets) const override;
|
const nsTArray<ScrollableLayerGuid>& aTargets) const override;
|
||||||
bool AsyncPanZoomEnabled() const override;
|
|
||||||
|
|
||||||
NS_IMETHOD CaptureRollupEvents(nsIRollupListener* aListener,
|
NS_IMETHOD CaptureRollupEvents(nsIRollupListener* aListener,
|
||||||
bool aDoCapture) override
|
bool aDoCapture) override
|
||||||
|
@ -1007,12 +1007,6 @@ nsBaseWidget::SetConfirmedTargetAPZC(uint64_t aInputBlockId,
|
|||||||
mAPZC.get(), setTargetApzcFunc, aInputBlockId, mozilla::Move(aTargets)));
|
mAPZC.get(), setTargetApzcFunc, aInputBlockId, mozilla::Move(aTargets)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
nsBaseWidget::AsyncPanZoomEnabled() const
|
|
||||||
{
|
|
||||||
return !!mAPZC;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsEventStatus
|
nsEventStatus
|
||||||
nsBaseWidget::ProcessUntransformedAPZEvent(WidgetInputEvent* aEvent,
|
nsBaseWidget::ProcessUntransformedAPZEvent(WidgetInputEvent* aEvent,
|
||||||
const ScrollableLayerGuid& aGuid,
|
const ScrollableLayerGuid& aGuid,
|
||||||
|
@ -242,8 +242,6 @@ public:
|
|||||||
void SetConfirmedTargetAPZC(uint64_t aInputBlockId,
|
void SetConfirmedTargetAPZC(uint64_t aInputBlockId,
|
||||||
const nsTArray<ScrollableLayerGuid>& aTargets) const override;
|
const nsTArray<ScrollableLayerGuid>& aTargets) const override;
|
||||||
|
|
||||||
bool AsyncPanZoomEnabled() const override;
|
|
||||||
|
|
||||||
void NotifyWindowDestroyed();
|
void NotifyWindowDestroyed();
|
||||||
void NotifySizeMoveDone();
|
void NotifySizeMoveDone();
|
||||||
void NotifyWindowMoved(int32_t aX, int32_t aY);
|
void NotifyWindowMoved(int32_t aX, int32_t aY);
|
||||||
|
@ -1807,11 +1807,6 @@ class nsIWidget : public nsISupports {
|
|||||||
virtual void SetConfirmedTargetAPZC(uint64_t aInputBlockId,
|
virtual void SetConfirmedTargetAPZC(uint64_t aInputBlockId,
|
||||||
const nsTArray<mozilla::layers::ScrollableLayerGuid>& aTargets) const = 0;
|
const nsTArray<mozilla::layers::ScrollableLayerGuid>& aTargets) const = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if APZ is in use, false otherwise.
|
|
||||||
*/
|
|
||||||
virtual bool AsyncPanZoomEnabled() const = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables the dropping of files to a widget (XXX this is temporary)
|
* Enables the dropping of files to a widget (XXX this is temporary)
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user