зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 442b037713d6 (bug 1389138)
This commit is contained in:
Родитель
6c9b12dc58
Коммит
953d244299
|
@ -21,6 +21,7 @@ ScrollingLayersHelper::ScrollingLayersHelper(WebRenderLayer* aLayer,
|
|||
: mLayer(aLayer)
|
||||
, mBuilder(&aBuilder)
|
||||
, mPushedLayerLocalClip(false)
|
||||
, mClipsPushed(0)
|
||||
{
|
||||
if (!mLayer->WrManager()->AsyncPanZoomEnabled()) {
|
||||
// If APZ is disabled then we don't need to push the scrolling clips. We
|
||||
|
@ -92,6 +93,7 @@ ScrollingLayersHelper::ScrollingLayersHelper(nsDisplayItem* aItem,
|
|||
: mLayer(nullptr)
|
||||
, mBuilder(&aBuilder)
|
||||
, mPushedLayerLocalClip(false)
|
||||
, mClipsPushed(0)
|
||||
{
|
||||
DefineAndPushChain(aItem->GetClipChain(), aBuilder, aStackingContext,
|
||||
aItem->Frame()->PresContext()->AppUnitsPerDevPixel(), aCache);
|
||||
|
@ -136,7 +138,7 @@ ScrollingLayersHelper::DefineAndPushChain(const DisplayItemClipChain* aChain,
|
|||
// Finally, push the clip onto the WR stack
|
||||
MOZ_ASSERT(clipId);
|
||||
aBuilder.PushClip(clipId.value());
|
||||
mPushedClips.push_back(wr::ScrollOrClipId(clipId.value()));
|
||||
mClipsPushed++;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -211,12 +213,10 @@ ScrollingLayersHelper::PushLayerClip(const LayerClip& aClip,
|
|||
ScrollingLayersHelper::~ScrollingLayersHelper()
|
||||
{
|
||||
if (!mLayer) {
|
||||
// For layers-free mode.
|
||||
while (!mPushedClips.empty()) {
|
||||
wr::ScrollOrClipId id = mPushedClips.back();
|
||||
MOZ_ASSERT(id.is<wr::WrClipId>());
|
||||
// For layers-free mode
|
||||
while (mClipsPushed > 0) {
|
||||
mBuilder->PopClip();
|
||||
mPushedClips.pop_back();
|
||||
mClipsPushed--;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ private:
|
|||
WebRenderLayer* mLayer;
|
||||
wr::DisplayListBuilder* mBuilder;
|
||||
bool mPushedLayerLocalClip;
|
||||
std::vector<wr::ScrollOrClipId> mPushedClips;
|
||||
int mClipsPushed;
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#ifndef GFX_WEBRENDERTYPES_H
|
||||
#define GFX_WEBRENDERTYPES_H
|
||||
|
||||
#include "FrameMetrics.h"
|
||||
#include "mozilla/webrender/webrender_ffi.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/gfx/Matrix.h"
|
||||
|
@ -15,7 +14,6 @@
|
|||
#include "mozilla/layers/LayersTypes.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
#include "mozilla/Range.h"
|
||||
#include "mozilla/Variant.h"
|
||||
#include "Units.h"
|
||||
#include "RoundedRect.h"
|
||||
#include "nsStyleConsts.h"
|
||||
|
@ -664,8 +662,6 @@ struct WrClipId {
|
|||
}
|
||||
};
|
||||
|
||||
typedef Variant<layers::FrameMetrics::ViewID, WrClipId> ScrollOrClipId;
|
||||
|
||||
} // namespace wr
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче