mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1104809 - Log accumulation of event regions into a PaintedLayer. r=mstange,tn
This commit is contained in:
parent
dacb431abe
commit
9b9c9319d4
@ -268,6 +268,20 @@ public:
|
||||
mNewChildLayersIndex(-1),
|
||||
mAllDrawingAbove(false)
|
||||
{}
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
/**
|
||||
* Keep track of important decisions for debugging.
|
||||
*/
|
||||
nsAutoCString mLog;
|
||||
|
||||
#define FLB_LOG_PAINTED_LAYER_DECISION(tld, ...) \
|
||||
tld->mLog.AppendPrintf("\t\t\t\t"); \
|
||||
tld->mLog.AppendPrintf(__VA_ARGS__);
|
||||
#else
|
||||
#define FLB_LOG_PAINTED_LAYER_DECISION(...)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Record that an item has been added to the PaintedLayer, so we
|
||||
* need to update our regions.
|
||||
@ -290,16 +304,16 @@ public:
|
||||
const nsIFrame* GetAnimatedGeometryRoot() { return mAnimatedGeometryRoot; }
|
||||
|
||||
/**
|
||||
* Add aHitRegion, aMaybeHitRegion, and aDispatchToContentHitRegion to the
|
||||
* hit regions for this PaintedLayer.
|
||||
* Add the given hit regions to the hit regions to the hit retions for this
|
||||
* PaintedLayer.
|
||||
*/
|
||||
void AccumulateEventRegions(const nsRegion& aHitRegion,
|
||||
const nsRegion& aMaybeHitRegion,
|
||||
const nsRegion& aDispatchToContentHitRegion)
|
||||
void AccumulateEventRegions(nsDisplayLayerEventRegions* aEventRegions)
|
||||
{
|
||||
mHitRegion.Or(mHitRegion, aHitRegion);
|
||||
mMaybeHitRegion.Or(mMaybeHitRegion, aMaybeHitRegion);
|
||||
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, aDispatchToContentHitRegion);
|
||||
FLB_LOG_PAINTED_LAYER_DECISION(this, "Accumulating event regions %p against tld=%p\n", aEventRegions, this);
|
||||
|
||||
mHitRegion.Or(mHitRegion, aEventRegions->HitRegion());
|
||||
mMaybeHitRegion.Or(mMaybeHitRegion, aEventRegions->MaybeHitRegion());
|
||||
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, aEventRegions->DispatchToContentHitRegion());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -374,20 +388,6 @@ public:
|
||||
return mFixedPosFrameForLayerData != nullptr;
|
||||
}
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
|
||||
/**
|
||||
* Keep track of important decisions for debugging.
|
||||
*/
|
||||
nsAutoCString mLog;
|
||||
|
||||
#define FLB_LOG_PAINTED_LAYER_DECISION(tld, ...) \
|
||||
tld->mLog.AppendPrintf("\t\t\t\t"); \
|
||||
tld->mLog.AppendPrintf(__VA_ARGS__);
|
||||
#else
|
||||
#define FLB_LOG_PAINTED_LAYER_DECISION(...)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The region of visible content in the layer, relative to the
|
||||
* container layer (which is at the snapped top-left of the display
|
||||
@ -3055,9 +3055,7 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
|
||||
if (itemType == nsDisplayItem::TYPE_LAYER_EVENT_REGIONS) {
|
||||
nsDisplayLayerEventRegions* eventRegions =
|
||||
static_cast<nsDisplayLayerEventRegions*>(item);
|
||||
paintedLayerData->AccumulateEventRegions(eventRegions->HitRegion(),
|
||||
eventRegions->MaybeHitRegion(),
|
||||
eventRegions->DispatchToContentHitRegion());
|
||||
paintedLayerData->AccumulateEventRegions(eventRegions);
|
||||
} else {
|
||||
// check to see if the new item has rounded rect clips in common with
|
||||
// other items in the layer
|
||||
|
Loading…
Reference in New Issue
Block a user