Closed
Bug 945203
Opened 11 years ago
Closed 11 years ago
Annotate layer tree with hit regions for event handling
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: roc, Assigned: roc)
References
Details
(Whiteboard: [qa-])
Attachments
(8 files)
(deleted),
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8347996 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8347997 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8347998 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8347999 -
Flags: review?(matspal)
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8348000 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8348001 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #8348002 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #8348003 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 9•11 years ago
|
||
Probably we should flip the ShouldBuildEventRegions flag to false for the initial landing. I'm nervous about the overhead of doing this stuff. The nsDisplayEventRegions approach is a little shaky but probably good enough. There's some simple optimizations we can do to reduce overhead if it becomes a problem. Some overhead is inevitable. I haven't done much testing. Some simple-but-tricky cases seem to work OK. One way to use this data right away would be to start async panning immediately when we get a touchstart on a page that has touch event handlers but not where the user is pressing. We probably need to do something to handle the new pointer events, probably something like the way we handle touch events here.
Comment 10•11 years ago
|
||
Comment on attachment 8347996 [details] [diff] [review] Part 1: Add Layers API to annotate layers with hit-test regions Review of attachment 8347996 [details] [diff] [review]: ----------------------------------------------------------------- LGTM
Attachment #8347996 -
Flags: review?(bugmail.mozilla) → review+
Updated•11 years ago
|
Attachment #8347998 -
Flags: review?(jmuizelaar) → review+
Updated•11 years ago
|
Attachment #8347997 -
Flags: review?(matt.woodrow) → review+
Updated•11 years ago
|
Attachment #8348000 -
Flags: review?(matt.woodrow) → review+
Comment 11•11 years ago
|
||
Comment on attachment 8348001 [details] [diff] [review] Part 6: Move ThebesLayerData to the top level so it can be referenced elsewhere Review of attachment 8348001 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/FrameLayerBuilder.cpp @@ +607,5 @@ > */ > ThebesLayerData* FindThebesLayerFor(nsDisplayItem* aItem, > + const nsIntRect& aVisibleRect, > + const nsIFrame* aAnimatedGeometryRoot, > + const nsPoint& aTopLeft); Did you mean to drop these two parameters?
Attachment #8348001 -
Flags: review?(matt.woodrow) → review+
Updated•11 years ago
|
Attachment #8348002 -
Flags: review?(matt.woodrow) → review+
Comment 12•11 years ago
|
||
Comment on attachment 8348003 [details] [diff] [review] Part 8: Add FrameLayerBuilder support for capturing nsDisplayEventRegions data into ThebesLayers Review of attachment 8348003 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/FrameLayerBuilder.cpp @@ +1729,5 @@ > + gfxRect transformed = > + aTransform.TransformBounds(gfxRect(bounds.x, bounds.y, bounds.width, bounds.height)); > + transformed.RoundOut(); > + nsIntRect intRect; > + if (!gfxUtils::GfxRectToIntRect(transformed, &intRect)) { Comment that this should only fail if the rect is too big to fit in an int32. @@ +1730,5 @@ > + aTransform.TransformBounds(gfxRect(bounds.x, bounds.y, bounds.width, bounds.height)); > + transformed.RoundOut(); > + nsIntRect intRect; > + if (!gfxUtils::GfxRectToIntRect(transformed, &intRect)) { > + *aDest = nsIntRect(-(1 << 30), -(1 << 30), 1 << 31, 1 << 31); Don't we have defines to use for these?
Attachment #8348003 -
Flags: review?(matt.woodrow) → review+
Comment 13•11 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #11) > Comment on attachment 8348001 [details] [diff] [review] > Part 6: Move ThebesLayerData to the top level so it can be referenced > elsewhere > > Review of attachment 8348001 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: layout/base/FrameLayerBuilder.cpp > @@ +607,5 @@ > > */ > > ThebesLayerData* FindThebesLayerFor(nsDisplayItem* aItem, > > + const nsIntRect& aVisibleRect, > > + const nsIFrame* aAnimatedGeometryRoot, > > + const nsPoint& aTopLeft); > > Did you mean to drop these two parameters? I guess you did, as part of part 8.
Comment 14•11 years ago
|
||
Comment on attachment 8348003 [details] [diff] [review] Part 8: Add FrameLayerBuilder support for capturing nsDisplayEventRegions data into ThebesLayers >+GetTransformToRoot(Layer* aLayer) >... >+ transform = transform*l->GetTransform(); spaces around the '*' please (or alternatively *=)
Comment 15•11 years ago
|
||
Comment on attachment 8347999 [details] [diff] [review] Part 4: Add nsDisplayEventRegions and build it when painting (In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #9) > Probably we should flip the ShouldBuildEventRegions flag to false for the > initial landing. Yes, please do that. I think it would be better to have it off initially to be able to see the true perf impact of the final code in case there are additional changes before we start using this (which might be hard to see if divided over several checkins). And also to verify that the off-switch is working as intended. >+class nsDisplayLayerEventRegions : public nsDisplayItem { MOZ_FINAL?
Attachment #8347999 -
Flags: review?(matspal) → review+
Assignee | ||
Comment 16•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=3bdec94a5d03
Assignee | ||
Comment 17•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/58ae7af68da1 https://hg.mozilla.org/integration/mozilla-inbound/rev/7e1fe524aba1 https://hg.mozilla.org/integration/mozilla-inbound/rev/772d415e8ca0 https://hg.mozilla.org/integration/mozilla-inbound/rev/6e20a8ceebb7 https://hg.mozilla.org/integration/mozilla-inbound/rev/0dcfe3e28c2e https://hg.mozilla.org/integration/mozilla-inbound/rev/3e7a7130adf2 https://hg.mozilla.org/integration/mozilla-inbound/rev/265f3a2040b4 https://hg.mozilla.org/integration/mozilla-inbound/rev/722d9c9944c1
Comment 18•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/58ae7af68da1 https://hg.mozilla.org/mozilla-central/rev/7e1fe524aba1 https://hg.mozilla.org/mozilla-central/rev/772d415e8ca0 https://hg.mozilla.org/mozilla-central/rev/6e20a8ceebb7 https://hg.mozilla.org/mozilla-central/rev/0dcfe3e28c2e https://hg.mozilla.org/mozilla-central/rev/3e7a7130adf2 https://hg.mozilla.org/mozilla-central/rev/265f3a2040b4 https://hg.mozilla.org/mozilla-central/rev/722d9c9944c1
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Comment 19•11 years ago
|
||
Out of curiosity, how hard would it be to uplift this to the 28 branch?
Flags: needinfo?(roc)
Comment 21•11 years ago
|
||
Btw on a recent master B2G build I turned on layer tree logging and it looks like the hitregion and dispatchtocontentregion are pretty much always empty. The only time I see it non-empty is on the B2G lockscreen, and there both regions are 1x1 in size. I haven't looked into it more yet but if there's anything obvious I should check or that I need to enable please let me know.
Comment 22•10 years ago
|
||
Turns out the code needed to be enabled by uncommenting the stuff in IsBuildingLayerEventRegions()
Updated•10 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•