Add style guidance for `k` prefix on constants.

The style guide only mentioned the `k` prefix for enums, but it is
also used throughout Skia for constant values.

Also removed guidance about using anonymous enums to declare an
integral constant. static constexprs should be preferred here.

Change-Id: I2f7d4d375cc914d4efb9fe60fbd90ddaaf8c1b69
No-Try: true
Docs-Preview: https://skia.org/?cl=308919
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308919
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/site/dev/contrib/style.md b/site/dev/contrib/style.md
index 2a695c0..5ef7aec 100644
--- a/site/dev/contrib/style.md
+++ b/site/dev/contrib/style.md
@@ -83,7 +83,18 @@
 }
 ~~~~
 
-Enum values are prefixed with k. Unscoped enum values are post fixed with
+Variables declared `constexpr` or `const`, and whose value is fixed for the
+duration of the program, are named with a leading "k" and then camel-capped.
+
+<!--?prettify?-->
+~~~~
+int drawPicture() {
+    constexpr SkISize kPictureSize = {100, 100};
+    constexpr float kZoom = 1.0f;
+}
+~~~~
+
+Enum values are also prefixed with k. Unscoped enum values are postfixed with
 an underscore and singular name of the enum name. The enum itself should be
 singular for exclusive values or plural for a bitfield. If a count is needed it
 is  `k<singular enum name>Count` and not be a member of the enum (see example),
@@ -91,6 +102,7 @@
 
 <!--?prettify?-->
 ~~~~
+// Enum class does not need suffixes.
 enum class SkPancakeType {
      kBlueberry,
      kPlain,
@@ -100,29 +112,27 @@
 
 <!--?prettify?-->
 ~~~~
-enum SkPancakeType {
-     kBlueberry_PancakeType,
-     kPlain_PancakeType,
-     kChocolateChip_PancakeType,
+// Enum should have a suffix after the enum name.
+enum SkDonutType {
+     kGlazed_DonutType,
+     kSprinkles_DonutType,
+     kChocolate_DonutType,
+     kMaple_DonutType,
 
-     kLast_PancakeType = kChocolateChip_PancakeType
+     kLast_DonutType = kMaple_DonutType
 };
 
-static const SkPancakeType kPancakeTypeCount = kLast_PancakeType + 1;
+static const SkDonutType kDonutTypeCount = kLast_DonutType + 1;
 ~~~~
 
-A bitfield:
-
 <!--?prettify?-->
 ~~~~
 enum SkSausageIngredientBits {
-    kFennel_SuasageIngredientBit = 0x1,
+    kFennel_SausageIngredientBit = 0x1,
     kBeef_SausageIngredientBit   = 0x2
 };
 ~~~~
 
-or:
-
 <!--?prettify?-->
 ~~~~
 enum SkMatrixFlags {
@@ -131,13 +141,6 @@
 };
 ~~~~
 
-Exception: anonymous enums can be used to declare integral constants, e.g.:
-
-<!--?prettify?-->
-~~~~
-enum { kFavoriteNumber = 7 };
-~~~~
-
 Macros are all caps with underscores between words. Macros that have greater
 than file scope should be prefixed SK or GR.