Skip to content

add overdraw inspector - #2489

Merged
ansis merged 1 commit into
masterfrom
overdraw
Apr 26, 2016
Merged

ansis merged 1 commit into
masterfrom
overdraw

Conversation

@ansis

@ansis ansis commented Apr 22, 2016

Copy link
Copy Markdown
Contributor

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

Comment thread js/render/painter.js Outdated
this.gl.lineWidth(util.clamp(width, this.lineWidthRange[0], this.lineWidthRange[1]));
};

Painter.prototype.overdrawInspector = function(enabled) {

@lucaswoj lucaswoj Apr 26, 2016 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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