Bug 1394518 - Log the mWrState pointer in WRDL_LOG so we can distinguish the output from different pipelines. r=jrmuizel

MozReview-Commit-ID: A3KDJyBmSCX

--HG--
extra : rebase_source : e5f8f4a3e6e16ed88bb8c8acf28f97fd45f02850
This commit is contained in:
Kartikaya Gupta 2017-08-28 14:20:25 -04:00
Родитель 85113c4391
Коммит 8933bc1c63
1 изменённых файлов: 15 добавлений и 13 удалений

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

@ -13,7 +13,7 @@
#include "mozilla/layers/SynchronousTask.h"
#define WRDL_LOG(...)
//#define WRDL_LOG(...) printf_stderr("WRDL: " __VA_ARGS__)
//#define WRDL_LOG(...) printf_stderr("WRDL(%p): " __VA_ARGS__)
namespace mozilla {
namespace wr {
@ -619,7 +619,7 @@ DisplayListBuilder::PushStackingContext(const wr::LayoutRect& aBounds,
perspective = ToLayoutTransform(*aPerspective);
}
const wr::LayoutTransform* maybePerspective = aPerspective ? &perspective : nullptr;
WRDL_LOG("PushStackingContext b=%s t=%s\n", Stringify(aBounds).c_str(),
WRDL_LOG("PushStackingContext b=%s t=%s\n", mWrState, Stringify(aBounds).c_str(),
aTransform ? Stringify(*aTransform).c_str() : "none");
wr_dp_push_stacking_context(mWrState, aBounds, aAnimationId, aOpacity,
maybeTransform, aTransformStyle, maybePerspective,
@ -629,7 +629,7 @@ DisplayListBuilder::PushStackingContext(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PopStackingContext()
{
WRDL_LOG("PopStackingContext\n");
WRDL_LOG("PopStackingContext\n", mWrState);
wr_dp_pop_stacking_context(mWrState);
}
@ -642,8 +642,8 @@ DisplayListBuilder::DefineClip(const wr::LayoutRect& aClipRect,
aComplex ? aComplex->Elements() : nullptr,
aComplex ? aComplex->Length() : 0,
aMask);
WRDL_LOG("DefineClip id=%" PRIu64 " r=%s m=%p b=%s complex=%d\n", clip_id,
Stringify(aClipRect).c_str(), aMask,
WRDL_LOG("DefineClip id=%" PRIu64 " r=%s m=%p b=%s complex=%zu\n", mWrState,
clip_id, Stringify(aClipRect).c_str(), aMask,
aMask ? Stringify(aMask->rect).c_str() : "none",
aComplex ? aComplex->Length() : 0);
return wr::WrClipId { clip_id };
@ -653,7 +653,7 @@ void
DisplayListBuilder::PushClip(const wr::WrClipId& aClipId, bool aRecordInStack)
{
wr_dp_push_clip(mWrState, aClipId.id);
WRDL_LOG("PushClip id=%" PRIu64 "\n", aClipId.id);
WRDL_LOG("PushClip id=%" PRIu64 "\n", mWrState, aClipId.id);
if (aRecordInStack) {
mClipIdStack.push_back(aClipId);
}
@ -662,7 +662,7 @@ DisplayListBuilder::PushClip(const wr::WrClipId& aClipId, bool aRecordInStack)
void
DisplayListBuilder::PopClip(bool aRecordInStack)
{
WRDL_LOG("PopClip id=%" PRIu64 "\n", mClipIdStack.back().id);
WRDL_LOG("PopClip id=%" PRIu64 "\n", mWrState, mClipIdStack.back().id);
if (aRecordInStack) {
mClipIdStack.pop_back();
}
@ -672,6 +672,7 @@ DisplayListBuilder::PopClip(bool aRecordInStack)
void
DisplayListBuilder::PushBuiltDisplayList(BuiltDisplayList &dl)
{
WRDL_LOG("PushBuiltDisplayList\n", mWrState);
wr_dp_push_built_display_list(mWrState,
dl.dl_desc,
&dl.dl.inner);
@ -682,7 +683,7 @@ DisplayListBuilder::PushScrollLayer(const layers::FrameMetrics::ViewID& aScrollI
const wr::LayoutRect& aContentRect,
const wr::LayoutRect& aClipRect)
{
WRDL_LOG("PushScrollLayer id=%" PRIu64 " co=%s cl=%s\n",
WRDL_LOG("PushScrollLayer id=%" PRIu64 " co=%s cl=%s\n", mWrState,
aScrollId, Stringify(aContentRect).c_str(), Stringify(aClipRect).c_str());
wr_dp_push_scroll_layer(mWrState, aScrollId, aContentRect, aClipRect);
if (!mScrollIdStack.empty()) {
@ -698,7 +699,7 @@ DisplayListBuilder::PushScrollLayer(const layers::FrameMetrics::ViewID& aScrollI
void
DisplayListBuilder::PopScrollLayer()
{
WRDL_LOG("PopScrollLayer id=%" PRIu64 "\n", mScrollIdStack.back());
WRDL_LOG("PopScrollLayer id=%" PRIu64 "\n", mWrState, mScrollIdStack.back());
mScrollIdStack.pop_back();
wr_dp_pop_scroll_layer(mWrState);
}
@ -707,7 +708,7 @@ void
DisplayListBuilder::PushClipAndScrollInfo(const layers::FrameMetrics::ViewID& aScrollId,
const wr::WrClipId* aClipId)
{
WRDL_LOG("PushClipAndScroll s=%" PRIu64 " c=%s\n", aScrollId,
WRDL_LOG("PushClipAndScroll s=%" PRIu64 " c=%s\n", mWrState, aScrollId,
aClipId ? Stringify(aClipId->id).c_str() : "none");
wr_dp_push_clip_and_scroll_info(mWrState, aScrollId,
aClipId ? &(aClipId->id) : nullptr);
@ -717,7 +718,7 @@ DisplayListBuilder::PushClipAndScrollInfo(const layers::FrameMetrics::ViewID& aS
void
DisplayListBuilder::PopClipAndScrollInfo()
{
WRDL_LOG("PopClipAndScroll\n");
WRDL_LOG("PopClipAndScroll\n", mWrState);
mScrollIdStack.pop_back();
wr_dp_pop_clip_and_scroll_info(mWrState);
}
@ -727,7 +728,7 @@ DisplayListBuilder::PushRect(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
const wr::ColorF& aColor)
{
WRDL_LOG("PushRect b=%s cl=%s c=%s\n",
WRDL_LOG("PushRect b=%s cl=%s c=%s\n", mWrState,
Stringify(aBounds).c_str(),
Stringify(aClip).c_str(),
Stringify(aColor).c_str());
@ -790,7 +791,8 @@ DisplayListBuilder::PushImage(const wr::LayoutRect& aBounds,
wr::ImageRendering aFilter,
wr::ImageKey aImage)
{
WRDL_LOG("PushImage b=%s cl=%s s=%s t=%s\n", Stringify(aBounds).c_str(),
WRDL_LOG("PushImage b=%s cl=%s s=%s t=%s\n", mWrState,
Stringify(aBounds).c_str(),
Stringify(aClip).c_str(), Stringify(aStretchSize).c_str(),
Stringify(aTileSpacing).c_str());
wr_dp_push_image(mWrState, aBounds, aClip, aStretchSize, aTileSpacing, aFilter, aImage);