Skip to content

Commit

Permalink
looking at pixel performance flutter/flutter#78543 note, this probabl…
Browse files Browse the repository at this point in the history
…y doesn't take into account scaling fully
  • Loading branch information
ibrierley committed Apr 26, 2021
1 parent 80a73e9 commit b6124ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/styles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ class Styles {
paint.strokeWidth = paint.strokeWidth * tileZoom / 16;
if(diffRatio > 0) paint.strokeWidth = paint.strokeWidth / diffRatio; // hmm not sure this is needed ?

paint.strokeWidth = paint.strokeWidth * tileZoom / 5;
paint.strokeWidth = paint.strokeWidth * tileZoom / 5; // testing https://github.com/flutter/flutter/issues/78543 for performance issues...
paint.strokeWidth = paint.strokeWidth > 1.0 ? 1.0 : paint.strokeWidth; // testing performance... maybe remove...

return paint;
}
Expand Down Expand Up @@ -181,7 +182,8 @@ class Styles {
}
}

paint.strokeWidth = paint.strokeWidth / sizeDiffRatio;
paint.strokeWidth = paint.strokeWidth / sizeDiffRatio; // testing performance at subpixels ?
paint.strokeWidth = paint.strokeWidth > 1.0 ? 1.0 : paint.strokeWidth; // testing performance...

return paint;
}
Expand Down

0 comments on commit b6124ee

Please sign in to comment.