From 7c70143055d93786f6bc5a97e64c6075939e1854 Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Thu, 2 May 2019 12:58:29 -0400 Subject: [PATCH] GMs: re-sort gni, script to regenerate gni, file name convention Change-Id: I4b61c2a66f8d6b2d8c4a5ffd8c373b643415c70c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211598 Commit-Queue: Hal Canary Reviewed-by: Ben Wagner --- gm/{animatedGif.cpp => animated_gif.cpp} | 0 gm/{copyTo4444.cpp => copy_to_4444.cpp} | 0 ...Laundry.cpp => gradient_dirty_laundry.cpp} | 0 ...eRasterImage.cpp => make_raster_image.cpp} | 0 gm/{OverStroke.cpp => overstroke.cpp} | 0 gn/gm.gni | 38 +++++++++---------- gn/make_gm_gni.py | 21 ++++++++++ 7 files changed, 40 insertions(+), 19 deletions(-) rename gm/{animatedGif.cpp => animated_gif.cpp} (100%) rename gm/{copyTo4444.cpp => copy_to_4444.cpp} (100%) rename gm/{gradientDirtyLaundry.cpp => gradient_dirty_laundry.cpp} (100%) rename gm/{makeRasterImage.cpp => make_raster_image.cpp} (100%) rename gm/{OverStroke.cpp => overstroke.cpp} (100%) create mode 100755 gn/make_gm_gni.py diff --git a/gm/animatedGif.cpp b/gm/animated_gif.cpp similarity index 100% rename from gm/animatedGif.cpp rename to gm/animated_gif.cpp diff --git a/gm/copyTo4444.cpp b/gm/copy_to_4444.cpp similarity index 100% rename from gm/copyTo4444.cpp rename to gm/copy_to_4444.cpp diff --git a/gm/gradientDirtyLaundry.cpp b/gm/gradient_dirty_laundry.cpp similarity index 100% rename from gm/gradientDirtyLaundry.cpp rename to gm/gradient_dirty_laundry.cpp diff --git a/gm/makeRasterImage.cpp b/gm/make_raster_image.cpp similarity index 100% rename from gm/makeRasterImage.cpp rename to gm/make_raster_image.cpp diff --git a/gm/OverStroke.cpp b/gm/overstroke.cpp similarity index 100% rename from gm/OverStroke.cpp rename to gm/overstroke.cpp diff --git a/gn/gm.gni b/gn/gm.gni index 900a0d75ce..ec411e8b78 100644 --- a/gn/gm.gni +++ b/gn/gm.gni @@ -16,8 +16,8 @@ gm_sources = [ "$_gm/alpha_image.cpp", "$_gm/alphagradients.cpp", "$_gm/analytic_gradients.cpp", - "$_gm/animatedGif.cpp", "$_gm/androidblendmodes.cpp", + "$_gm/animated_gif.cpp", "$_gm/animatedimageblurs.cpp", "$_gm/anisotropic.cpp", "$_gm/annotated_text.cpp", @@ -50,19 +50,19 @@ gm_sources = [ "$_gm/blurcircles2.cpp", "$_gm/blurignorexform.cpp", "$_gm/blurimagevmask.cpp", + "$_gm/blurpositioning.cpp", "$_gm/blurquickreject.cpp", "$_gm/blurrect.cpp", "$_gm/blurredclippedcircle.cpp", "$_gm/blurroundrect.cpp", "$_gm/blurs.cpp", - "$_gm/blurpositioning.cpp", "$_gm/blurtextsmallradii.cpp", "$_gm/bmpfilterqualityrepeat.cpp", "$_gm/bug5252.cpp", - "$_gm/bug6643.cpp", - "$_gm/bug6783.cpp", "$_gm/bug530095.cpp", "$_gm/bug615686.cpp", + "$_gm/bug6643.cpp", + "$_gm/bug6783.cpp", "$_gm/cgm.c", "$_gm/cgms.cpp", "$_gm/circle_sizes.cpp", @@ -83,10 +83,10 @@ gm_sources = [ "$_gm/colormatrix.cpp", "$_gm/colorwheel.cpp", "$_gm/complexclip.cpp", - "$_gm/complexclip_blur_tiled.cpp", "$_gm/complexclip2.cpp", "$_gm/complexclip3.cpp", "$_gm/complexclip4.cpp", + "$_gm/complexclip_blur_tiled.cpp", "$_gm/composeshader.cpp", "$_gm/compositor_quads.cpp", "$_gm/concavepaths.cpp", @@ -96,7 +96,7 @@ gm_sources = [ "$_gm/convexpaths.cpp", "$_gm/convexpolyclip.cpp", "$_gm/convexpolyeffect.cpp", - "$_gm/copyTo4444.cpp", + "$_gm/copy_to_4444.cpp", "$_gm/crbug_691386.cpp", "$_gm/crbug_788500.cpp", "$_gm/crbug_847759.cpp", @@ -107,8 +107,8 @@ gm_sources = [ "$_gm/crbug_905548.cpp", "$_gm/crbug_918512.cpp", "$_gm/crbug_938592.cpp", - "$_gm/crbug_947055.cpp", "$_gm/crbug_946965.cpp", + "$_gm/crbug_947055.cpp", "$_gm/croppedrects.cpp", "$_gm/crosscontextimage.cpp", "$_gm/cubicpaths.cpp", @@ -128,8 +128,8 @@ gm_sources = [ "$_gm/drawatlas.cpp", "$_gm/drawatlascolor.cpp", "$_gm/drawbitmaprect.cpp", - "$_gm/drawlooper.cpp", "$_gm/drawimageset.cpp", + "$_gm/drawlooper.cpp", "$_gm/drawminibitmaprect.cpp", "$_gm/drawquadset.cpp", "$_gm/drawregion.cpp", @@ -140,10 +140,10 @@ gm_sources = [ "$_gm/dstreadshuffle.cpp", "$_gm/emboss.cpp", "$_gm/emptypath.cpp", - "$_gm/encode.cpp", "$_gm/encode-alpha-jpeg.cpp", "$_gm/encode-platform.cpp", "$_gm/encode-srgb.cpp", + "$_gm/encode.cpp", "$_gm/etc1.cpp", "$_gm/extractbitmap.cpp", "$_gm/fadefilter.cpp", @@ -167,11 +167,11 @@ gm_sources = [ "$_gm/giantbitmap.cpp", "$_gm/glyph_pos.cpp", "$_gm/gm.cpp", + "$_gm/gradient_dirty_laundry.cpp", "$_gm/gradient_matrix.cpp", - "$_gm/gradientDirtyLaundry.cpp", "$_gm/gradients.cpp", - "$_gm/gradients_degenerate.cpp", "$_gm/gradients_2pt_conical.cpp", + "$_gm/gradients_degenerate.cpp", "$_gm/gradients_no_texture.cpp", "$_gm/gradtext.cpp", "$_gm/grayscalejpg.cpp", @@ -180,8 +180,8 @@ gm_sources = [ "$_gm/hardstop_gradients.cpp", "$_gm/highcontrastfilter.cpp", "$_gm/hittestpath.cpp", - "$_gm/hugepath.cpp", "$_gm/hsl.cpp", + "$_gm/hugepath.cpp", "$_gm/image.cpp", "$_gm/image_pict.cpp", "$_gm/image_shader.cpp", @@ -225,8 +225,8 @@ gm_sources = [ "$_gm/localmatrixshader.cpp", "$_gm/lumafilter.cpp", "$_gm/mac_aa_explorer.cpp", + "$_gm/make_raster_image.cpp", "$_gm/makecolorspace.cpp", - "$_gm/makeRasterImage.cpp", "$_gm/mandoline.cpp", "$_gm/manypaths.cpp", "$_gm/matrixconvolution.cpp", @@ -246,7 +246,7 @@ gm_sources = [ "$_gm/ovals.cpp", "$_gm/overdrawcanvas.cpp", "$_gm/overdrawcolorfilter.cpp", - "$_gm/OverStroke.cpp", + "$_gm/overstroke.cpp", "$_gm/p3.cpp", "$_gm/patch.cpp", "$_gm/path_stroke_with_zero_length.cpp", @@ -273,8 +273,8 @@ gm_sources = [ "$_gm/plus.cpp", "$_gm/points.cpp", "$_gm/poly2poly.cpp", - "$_gm/polygons.cpp", "$_gm/polygonoffset.cpp", + "$_gm/polygons.cpp", "$_gm/postercircle.cpp", "$_gm/quadpaths.cpp", "$_gm/radial_gradient_precision.cpp", @@ -292,9 +292,9 @@ gm_sources = [ "$_gm/samplelocations.cpp", "$_gm/samplerstress.cpp", "$_gm/savelayer.cpp", - "$_gm/scaledstrokes.cpp", "$_gm/scaledemoji.cpp", "$_gm/scaledemoji_rendering.cpp", + "$_gm/scaledstrokes.cpp", "$_gm/shadermaskfilter.cpp", "$_gm/shadertext3.cpp", "$_gm/shadows.cpp", @@ -303,15 +303,15 @@ gm_sources = [ "$_gm/shapes.cpp", "$_gm/sharedcorners.cpp", "$_gm/showmiplevels.cpp", - "$_gm/simpleaaclip.cpp", "$_gm/simple_magnification.cpp", + "$_gm/simpleaaclip.cpp", "$_gm/simplerect.cpp", + "$_gm/skbug1719.cpp", "$_gm/skbug_257.cpp", "$_gm/skbug_4868.cpp", "$_gm/skbug_5321.cpp", "$_gm/skbug_8664.cpp", "$_gm/skbug_8955.cpp", - "$_gm/skbug1719.cpp", "$_gm/skinning.cpp", "$_gm/smallarc.cpp", "$_gm/smallpaths.cpp", @@ -332,6 +332,7 @@ gm_sources = [ "$_gm/tablecolorfilter.cpp", "$_gm/tallstretchedbitmaps.cpp", "$_gm/testgradient.cpp", + "$_gm/text_scale_skew.cpp", "$_gm/textblob.cpp", "$_gm/textblobblockreordering.cpp", "$_gm/textblobcolortrans.cpp", @@ -343,7 +344,6 @@ gm_sources = [ "$_gm/textblobtransforms.cpp", "$_gm/textblobuseaftergpufree.cpp", "$_gm/texteffects.cpp", - "$_gm/text_scale_skew.cpp", "$_gm/texturedomaineffect.cpp", "$_gm/thinconcavepaths.cpp", "$_gm/thinrects.cpp", diff --git a/gn/make_gm_gni.py b/gn/make_gm_gni.py new file mode 100755 index 0000000000..77bfb8e017 --- /dev/null +++ b/gn/make_gm_gni.py @@ -0,0 +1,21 @@ +#! /usr/bin/env python +# Copyright 2019 Google LLC. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +import os +import glob +os.chdir(os.path.dirname(__file__)) +with open('gm.gni', 'w') as o: + o.write('''# Copyright 2016 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Things are easiest for everyone if these source paths are absolute. +_gm = get_path_info("../gm", "abspath") + +gm_sources = [ +''') + for path in sorted(glob.glob('../gm/*.c*')): + o.write(' "%s",\n' % path.replace('../gm', '$_gm')) + o.write(']\n')