Skip to content
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

add overdraw inspector #2489

Merged
merged 1 commit into from
Apr 26, 2016
Merged

add overdraw inspector #2489

merged 1 commit into from
Apr 26, 2016

Conversation

ansis
Copy link
Contributor

@ansis ansis commented Apr 22, 2016

The overdraw inspector shows how many time each fragment has been shaded. White fragments were shaded 8 or more times. Black fragments were shaded 0 times. Lower is better.

This only counts shaded fragments that were written to the color buffer. Fragments that are written only to the stencil buffer are not included.

map.showOverdrawInspector = true

screen shot 2016-04-22 at 4 15 09 pm

mapbox-streets landuse overdraws a lot:

screen shot 2016-04-22 at 4 15 31 pm

mapbox-streets terrain overdraws a lot:

screen shot 2016-04-22 at 4 16 15 pm

👀 @kkaefer @mourner @lucaswoj

@@ -374,3 +377,20 @@ Painter.prototype.setExMatrix = function(exMatrix) {
Painter.prototype.lineWidth = function(width) {
this.gl.lineWidth(util.clamp(width, this.lineWidthRange[0], this.lineWidthRange[1]));
};

Painter.prototype.overdrawInspector = function(enabled) {
Copy link
Contributor

@lucaswoj lucaswoj Apr 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this method name a verb instead of a noun? i.e. setOverdrawInspector

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to change this to showOverdrawInspector to match the external property.

The overdraw inspector shows how many time each fragment has been
shaded. White fragments were shaded 8 or more times. Black fragments
were shaded 0 times. Lower is better.

`map.showOverdrawInspector = true` turns it on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants