-
-
Notifications
You must be signed in to change notification settings - Fork 451
Add masking debug overlay #4357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- Add masking debug overlay ([#4357](https://github.com/getsentry/sentry-java/pull/4357)) If none of the above apply, you can opt out of this check by adding |
Performance metrics 🚀
|
canvas.drawRect(mask, paint) | ||
|
||
paint.style = Paint.Style.FILL | ||
val label = "${mask.left} ${mask.top}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally I'd want to have bottom and right too, shall we maybe use a smaller textSize but include all the bounds? e.g. in this format 0, 0 - 1, 1
paint.strokeWidth = 4f | ||
|
||
for (mask in masks) { | ||
paint.setColor(Color.BLACK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if we should use Color.RED (or some other which is more prominent in case of a black/white background for example)
paint | ||
) | ||
paint.setColor(Color.BLACK) | ||
canvas.drawText( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we actually draw this label outside the mask rect? I think it's nicer visually and wouldn't potentially overlap the content inside the mask (which may be useful to see in some cases)
Yeah so I talked to @krystofwoldrich yesterday, and turns out iOS also has a similar option - we were thinking of introducing a top-level api like |
Cocoa has Related cocoa PRs: |
alright, couldn't we draw stroke rectangles instead of solid? then we wouldn't need the opacity parameter. Just trying to align I guess |
📜 Description
Masks, revealed
For debugging purposes
TBD:
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps