mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 12:45:27 +00:00
Bug 1394695 - Don't push scrolling clips in layers-free WR if APZ is disabled. r=mstange
MozReview-Commit-ID: AesXui61mB2 --HG-- extra : rebase_source : bd8d1adacb3be142cc5227e9bae347abf0ddc14d
This commit is contained in:
parent
0adcdd620d
commit
0473ebc109
@ -89,7 +89,8 @@ ScrollingLayersHelper::ScrollingLayersHelper(WebRenderLayer* aLayer,
|
||||
ScrollingLayersHelper::ScrollingLayersHelper(nsDisplayItem* aItem,
|
||||
wr::DisplayListBuilder& aBuilder,
|
||||
const StackingContextHelper& aStackingContext,
|
||||
WebRenderLayerManager::ClipIdMap& aCache)
|
||||
WebRenderLayerManager::ClipIdMap& aCache,
|
||||
bool aApzEnabled)
|
||||
: mLayer(nullptr)
|
||||
, mBuilder(&aBuilder)
|
||||
, mPushedLayerLocalClip(false)
|
||||
@ -97,6 +98,14 @@ ScrollingLayersHelper::ScrollingLayersHelper(nsDisplayItem* aItem,
|
||||
{
|
||||
int32_t auPerDevPixel = aItem->Frame()->PresContext()->AppUnitsPerDevPixel();
|
||||
|
||||
if (!aApzEnabled) {
|
||||
// If APZ is not enabled, we can ignore all the stuff with ASRs; we just
|
||||
// need to define the clip chain on the item and that's it.
|
||||
DefineAndPushChain(aItem->GetClipChain(), aBuilder, aStackingContext,
|
||||
auPerDevPixel, aCache);
|
||||
return;
|
||||
}
|
||||
|
||||
// There are two ASR chains here that we need to be fully defined. One is the
|
||||
// ASR chain pointed to by aItem->GetActiveScrolledRoot(). The other is the
|
||||
// ASR chain pointed to by aItem->GetClipChain()->mASR. We pick the leafmost
|
||||
|
@ -33,7 +33,8 @@ public:
|
||||
ScrollingLayersHelper(nsDisplayItem* aItem,
|
||||
wr::DisplayListBuilder& aBuilder,
|
||||
const StackingContextHelper& aStackingContext,
|
||||
WebRenderLayerManager::ClipIdMap& aCache);
|
||||
WebRenderLayerManager::ClipIdMap& aCache,
|
||||
bool aApzEnabled);
|
||||
~ScrollingLayersHelper();
|
||||
|
||||
private:
|
||||
|
@ -328,7 +328,7 @@ WebRenderLayerManager::CreateWebRenderCommandsFromDisplayList(nsDisplayList* aDi
|
||||
}
|
||||
|
||||
{ // scope the ScrollingLayersHelper
|
||||
ScrollingLayersHelper clip(item, aBuilder, aSc, mClipIdCache);
|
||||
ScrollingLayersHelper clip(item, aBuilder, aSc, mClipIdCache, AsyncPanZoomEnabled());
|
||||
|
||||
// Note: this call to CreateWebRenderCommands can recurse back into
|
||||
// this function if the |item| is a wrapper for a sublist.
|
||||
|
Loading…
Reference in New Issue
Block a user