Bug 1405359 - Add some logging code in ScrollingLayersHelper. r=jrmuizel

MozReview-Commit-ID: Lb4UeUxO5HL

--HG--
extra : rebase_source : e5e8c58380055693664bb1a5241bab4d803dfdab
This commit is contained in:
Kartikaya Gupta 2017-10-24 18:47:24 -04:00
Родитель 4891a7a56f
Коммит d37fe26642
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -12,6 +12,9 @@
#include "nsDisplayList.h"
#include "UnitTransforms.h"
#define SLH_LOG(...)
//#define SLH_LOG(...) printf_stderr("SLH: " __VA_ARGS__)
namespace mozilla {
namespace layers {
@ -55,12 +58,15 @@ void
ScrollingLayersHelper::BeginItem(nsDisplayItem* aItem,
const StackingContextHelper& aStackingContext)
{
SLH_LOG("processing item %p\n", aItem);
ItemClips clips(aItem->GetActiveScrolledRoot(), aItem->GetClipChain());
MOZ_ASSERT(!mItemClipStack.empty());
if (clips.HasSameInputs(mItemClipStack.back())) {
// Early-exit because if the clips are the same then we don't need to do
// do the work of popping the old stuff and then pushing it right back on
// for the new item.
SLH_LOG("early-exit for %p\n", aItem);
return;
}
mItemClipStack.back().Unapply(mBuilder);
@ -130,6 +136,8 @@ ScrollingLayersHelper::BeginItem(nsDisplayItem* aItem,
clips.Apply(mBuilder);
mItemClipStack.push_back(clips);
SLH_LOG("done setup for %p\n", aItem);
}
std::pair<Maybe<FrameMetrics::ViewID>, Maybe<wr::WrClipId>>