|
Replace a lot of 'static const' with 'constexpr' or 'const'.
'static const' means, there must be at most one of these, and initialize it at
compile time if possible or runtime if necessary. This leads to unexpected
code execution, and TSAN* will complain about races on the guard variables.
Generally 'constexpr' or 'const' are better choices. Neither can cause races:
they're either intialized at compile time (constexpr) or intialized each time
independently (const).
This CL prefers constexpr where possible, and uses const where not. It even
prefers constexpr over const where they don't make a difference... I want to have
lots of examples of constexpr for people to see and mimic.
The scoped-to-class static has nothing to do with any of this, and is not changed.
* Not yet on the bots, which use an older TSAN.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005
Committed: https://skia.googlesource.com/skia/+/dbfd7ab10883f173f5c1b653a233e18dc6142002
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+583 lines, -588 lines) |
Patch |
|
M |
gm/aarectmodes.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/aaxfermodes.cpp
|
View
|
1
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/alphagradients.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/anisotropic.cpp
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/arithmode.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/beziereffects.cpp
|
View
|
|
8 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
|
M |
gm/beziers.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/bigblurs.cpp
|
View
|
|
3 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
gm/bigrrectaaeffect.cpp
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/bigtileimagefilter.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/bitmapcopy.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/bitmappremul.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/bitmaprect.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/bleed.cpp
|
View
|
|
5 chunks |
+30 lines, -30 lines |
0 comments
|
Download
|
|
M |
gm/blurcircles.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/blurcircles2.cpp
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/blurquickreject.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/blurrect.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/blurredclippedcircle.cpp
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/blurs.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/bmpfilterqualityrepeat.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/circulararcs.cpp
|
View
|
|
5 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
|
M |
gm/clippedbitmapshaders.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/colorcube.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/coloremoji.cpp
|
View
|
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/complexclip.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/complexclip2.cpp
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/complexclip3.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/composeshader.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/constcolorprocessor.cpp
|
View
|
|
2 chunks |
+7 lines, -10 lines |
0 comments
|
Download
|
|
M |
gm/convex_all_line_paths.cpp
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/convexpolyclip.cpp
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/convexpolyeffect.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/cubicpaths.cpp
|
View
|
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/dashcircle.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/dashing.cpp
|
View
|
|
4 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
gm/dcshader.cpp
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/degeneratesegments.cpp
|
View
|
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/distantclip.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/drawatlascolor.cpp
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/drawbitmaprect.cpp
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/drawlooper.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/drawminibitmaprect.cpp
|
View
|
|
3 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
gm/dstreadshuffle.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/emptypath.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/filterfastbounds.cpp
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/fontmgr.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/gammacolorfilter.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/glyph_pos.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/glyph_pos_align.cpp
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/gm.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/gradientDirtyLaundry.cpp
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/gradient_matrix.cpp
|
View
|
|
3 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
gm/gradients.cpp
|
View
|
|
2 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
gm/gradients_2pt_conical.cpp
|
View
|
|
3 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
|
M |
gm/gradients_no_texture.cpp
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/hairlines.cpp
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/hairmodes.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/image.cpp
|
View
|
1
2
|
3 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
|
M |
gm/imageblur2.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/imagefromyuvtextures.cpp
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/imagemagnifier.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/imagescalealigned.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/imagesource2.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/imagetoyuvplanes.cpp
|
View
|
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/inversepaths.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/largeglyphblur.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/lcdblendmodes.cpp
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/lcdoverlap.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/lighting.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/lightingshader.cpp
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/lightingshader2.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/linepaths.cpp
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/megalooper.cpp
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/mixedtextblobs.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/modecolorfilters.cpp
|
View
|
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/multipicturedraw.cpp
|
View
|
|
9 chunks |
+23 lines, -23 lines |
0 comments
|
Download
|
|
M |
gm/nested.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/nonclosedpaths.cpp
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/occludedrrectblur.cpp
|
View
|
|
10 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
|
M |
gm/patchgrid.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/pathcontourstart.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/patheffects.cpp
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/pathfill.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/perspshaders.cpp
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/pictureimagegenerator.cpp
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/pictureshadertile.cpp
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/pixelsnap.cpp
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/polygons.cpp
|
View
|
|
3 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
gm/quadpaths.cpp
|
View
|
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/recordopts.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/rectangletexture.cpp
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/rrect.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/rrectclipdrawpaint.cpp
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/rrects.cpp
|
View
|
|
2 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
|
M |
gm/samplerstress.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/shadertext.cpp
|
View
|
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
gm/shadertext2.cpp
|
View
|
|
4 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
|
M |
gm/shadertext3.cpp
|
View
|
|
3 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
gm/shadowmaps.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/shadows.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/simpleaaclip.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/smallpaths.cpp
|
View
|
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/stringart.cpp
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/stroke_rect_shader.cpp
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/strokedlines.cpp
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/strokerect.cpp
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/strokerects.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/strokes.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/tallstretchedbitmaps.cpp
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/texdata.cpp
|
View
|
|
2 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
gm/textblobblockreordering.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/textblobcolortrans.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/textblobgeometrychange.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/textbloblooper.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/textblobmixedsizes.cpp
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/textblobrandomfont.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/textblobshader.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/textblobtransforms.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/textblobuseaftergpufree.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/texteffects.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/texturedomaineffect.cpp
|
View
|
|
1 chunk |
+4 lines, -8 lines |
0 comments
|
Download
|
|
M |
gm/thinrects.cpp
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/thinstrokedrects.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
gm/tilemodes.cpp
|
View
|
|
4 chunks |
+11 lines, -10 lines |
0 comments
|
Download
|
|
M |
gm/tilemodes_scaled.cpp
|
View
|
|
4 chunks |
+11 lines, -10 lines |
0 comments
|
Download
|
|
M |
gm/typeface.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/variedtext.cpp
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
gm/vertices.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/verttext.cpp
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
gm/xfermodeimagefilter.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/xfermodes2.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
gm/xfermodes3.cpp
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
gm/yuvtorgbeffect.cpp
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
Total messages: 25 (21 generated)
|