From 602117e0cbb405f872d96819fa5317e702742f00 Mon Sep 17 00:00:00 2001 From: Samuel Freilich Date: Mon, 15 Dec 2025 12:50:50 -0800 Subject: [PATCH] Internal change PiperOrigin-RevId: 844885205 --- ink/brush/brush_behavior.h | 15 --------- ink/brush/brush_family.h | 4 --- ink/brush/brush_paint.h | 5 --- ink/brush/fuzz_domains.cc | 32 ------------------- ink/color/color.h | 2 -- ink/color/color_space.h | 7 ---- ink/color/fuzz_domains.cc | 4 --- ink/geometry/fuzz_domains.cc | 6 ---- ink/geometry/mesh_format.h | 12 ------- .../sksl_vertex_shader_helper_functions.h | 19 ----------- ink/storage/proto/brush_family.proto | 32 ------------------- ink/storage/proto/color.proto | 2 -- ink/storage/proto/mesh.proto | 4 --- ink/strokes/input/fuzz_domains.cc | 2 -- .../internal/brush_tip_extruder/geometry.cc | 2 -- .../spring_based_input_modeler.cc | 4 --- .../internal/stroke_input_modeler_test.cc | 2 -- ink/strokes/internal/stroke_vertex.cc | 18 ----------- ink/strokes/internal/stroke_vertex.h | 3 -- 19 files changed, 175 deletions(-) diff --git a/ink/brush/brush_behavior.h b/ink/brush/brush_behavior.h index 9b93eaee..97536e36 100644 --- a/ink/brush/brush_behavior.h +++ b/ink/brush/brush_behavior.h @@ -399,19 +399,13 @@ struct BrushBehavior { }; // A binary operation for combining two values in a `BinaryOpNode`. - // LINT.IfChange(binary_op) enum class BinaryOp { kProduct, // A * B, or null if either is null kSum, // A + B, or null if either is null }; - // LINT.ThenChange( - // fuzz_domains.cc:binary_op, - // ../storage/proto/brush_family.proto:binary_op, - // ) // Dimensions/units for measuring the `damping_gap` field of a // `DampingNode`. - // LINT.IfChange(damping_source) enum class DampingSource { // Value damping occurs over distance traveled by the input pointer, and the // `damping_gap` is measured in centimeters. If the input data does not @@ -427,14 +421,9 @@ struct BrushBehavior { // seconds. kTimeInSeconds, }; - // LINT.ThenChange( - // fuzz_domains.cc:damping_source, - // ../storage/proto/brush_family.proto:damping_source, - // ) // An interpolation function for combining three values in an // `InterpolationNode`. - // LINT.IfChange(interpolation) enum class Interpolation { // Linear interpolation. Uses parameter A to interpolate between B (when // A=0) and C (when A=1). @@ -443,10 +432,6 @@ struct BrushBehavior { // interpolating linearly in between. Outputs null if B=C. kInverseLerp, }; - // LINT.ThenChange( - // fuzz_domains.cc:interpolation, - // ../storage/proto/brush_family.proto:interpolation, - // ) //////////////////////// /// LEAF VALUE NODES /// diff --git a/ink/brush/brush_family.h b/ink/brush/brush_family.h index 952b9775..ee595d9b 100644 --- a/ink/brush/brush_family.h +++ b/ink/brush/brush_family.h @@ -36,8 +36,6 @@ namespace ink { // serialization and asset management APIs. class BrushFamily { public: - // LINT.IfChange(input_model_types) - // Spring-based input modeler. Stored in the `InputModel` variant below to // allow future input models to be added without changing the shape of // existing strokes. @@ -71,8 +69,6 @@ class BrushFamily { using InputModel = std::variant; - // LINT.ThenChange(../strokes/internal/stroke_input_modeler_test.cc:input_model_types) - // Returns the default `InputModel` that will be used by // `BrushFamily::Create()` when none is specified. static InputModel DefaultInputModel(); diff --git a/ink/brush/brush_paint.h b/ink/brush/brush_paint.h index c1d3dfa5..8baf1966 100644 --- a/ink/brush/brush_paint.h +++ b/ink/brush/brush_paint.h @@ -115,7 +115,6 @@ struct BrushPaint { // Setting for how an incoming ("source" / "src") color should be combined // with the already present ("destination" / "dst") color at a given pixel. - // LINT.IfChange(blend_mode) enum class BlendMode { // Source and destination are component-wise multiplied, including opacity. // @@ -209,10 +208,6 @@ struct BrushPaint { // modes. For Android graphics.Canvas, properly supporting these won't be // possible until Android W at the earliest due to b/267164444. }; - // LINT.ThenChange( - // ../storage/proto/brush_family.proto:blend_mode, - // fuzz_domains.cc:blend_mode, - // ) // Keyframe values used by `TextureLayer` below. struct TextureKeyframe { diff --git a/ink/brush/fuzz_domains.cc b/ink/brush/fuzz_domains.cc index 59be719d..8012f6a1 100644 --- a/ink/brush/fuzz_domains.cc +++ b/ink/brush/fuzz_domains.cc @@ -123,16 +123,13 @@ Domain ValidBrushBehaviorEnabledToolTypes() { Arbitrary())); } -// LINT.IfChange(binary_op) Domain ArbitraryBrushBehaviorBinaryOp() { return ElementOf({ BrushBehavior::BinaryOp::kProduct, BrushBehavior::BinaryOp::kSum, }); } -// LINT.ThenChange(brush_behavior.h:binary_op) -// LINT.IfChange(damping_source) Domain ArbitraryBrushBehaviorDampingSource() { return ElementOf({ BrushBehavior::DampingSource::kDistanceInCentimeters, @@ -140,18 +137,14 @@ Domain ArbitraryBrushBehaviorDampingSource() { BrushBehavior::DampingSource::kTimeInSeconds, }); } -// LINT.ThenChange(brush_behavior.h:damping_source) -// LINT.IfChange(interpolation) Domain ArbitraryBrushBehaviorInterpolation() { return ElementOf({ BrushBehavior::Interpolation::kLerp, BrushBehavior::Interpolation::kInverseLerp, }); } -// LINT.ThenChange(brush_behavior.h:interpolation) -// LINT.IfChange(optional_input_property) Domain ArbitraryBrushBehaviorOptionalInputProperty() { return ElementOf({ @@ -161,9 +154,7 @@ ArbitraryBrushBehaviorOptionalInputProperty() { BrushBehavior::OptionalInputProperty::kTiltXAndY, }); } -// LINT.ThenChange(brush_behavior.h:optional_input_property) -// LINT.IfChange(out_of_range) Domain ArbitraryBrushBehaviorOutOfRange() { return ElementOf({ BrushBehavior::OutOfRange::kClamp, @@ -181,9 +172,7 @@ Domain ValidBrushBehaviorOutOfRangeForSource( return ArbitraryBrushBehaviorOutOfRange(); } } -// LINT.ThenChange(brush_behavior.h:out_of_range) -// LINT.IfChange(source) Domain ArbitraryBrushBehaviorSource() { return ElementOf({ BrushBehavior::Source::kNormalizedPressure, @@ -233,9 +222,7 @@ Domain ArbitraryBrushBehaviorSource() { BrushBehavior::Source::kDistanceRemainingAsFractionOfStrokeLength, }); } -// LINT.ThenChange(brush_behavior.h:source) -// LINT.IfChange(target) Domain ArbitraryBrushBehaviorTarget( DomainVariant variant) { std::vector targets = { @@ -261,9 +248,7 @@ Domain ArbitraryBrushBehaviorTarget( } return ElementOf(targets); } -// LINT.ThenChange(brush_behavior.h:target) -// LINT.IfChange(polar_target) Domain ArbitraryBrushBehaviorPolarTarget() { return ElementOf({ BrushBehavior::PolarTarget:: @@ -272,7 +257,6 @@ Domain ArbitraryBrushBehaviorPolarTarget() { kPositionOffsetRelativeInRadiansAndMultiplesOfBrushSize, }); } -// LINT.ThenChange(brush_behavior.h:polar_target) Domain ValidColorFunctionOpacityMultiplier() { return StructOf(FiniteNonNegativeFloat()); @@ -282,7 +266,6 @@ Domain ValidColorFunctionReplaceColor() { return StructOf(ArbitraryColor()); } -// LINT.IfChange(predefined) Domain ArbitraryEasingFunctionPredefined() { return ElementOf({ EasingFunction::Predefined::kLinear, @@ -294,7 +277,6 @@ Domain ArbitraryEasingFunctionPredefined() { EasingFunction::Predefined::kStepEnd, }); } -// LINT.ThenChange(easing_function.h:predefined) Domain ValidEasingFunctionCubicBezier() { return StructOf( @@ -323,12 +305,10 @@ Domain ValidEasingFunctionSteps() { .step_position = step_position}; }, InRange(1, std::numeric_limits::max()), - // LINT.IfChange(step_position) ElementOf({EasingFunction::StepPosition::kJumpEnd, EasingFunction::StepPosition::kJumpStart, EasingFunction::StepPosition::kJumpNone, EasingFunction::StepPosition::kJumpBoth})); - // LINT.ThenChange(easing_function.h:step_position) } Domain ValidBrushBehaviorSourceNode() { @@ -560,25 +540,20 @@ Domain ValidBrushFamilyInputModel() { namespace { -// LINT.IfChange(texture_size_unit) Domain ArbitraryBrushPaintTextureSizeUnit() { return ElementOf({ BrushPaint::TextureSizeUnit::kBrushSize, BrushPaint::TextureSizeUnit::kStrokeCoordinates, }); } -// LINT.ThenChange(brush_paint.h:texture_size_unit) -// LINT.IfChange(texture_mapping) Domain ArbitraryBrushPaintTextureMapping() { return ElementOf({ BrushPaint::TextureMapping::kTiling, BrushPaint::TextureMapping::kStamping, }); } -// LINT.ThenChange(brush_paint.h:texture_mapping) -// LINT.IfChange(texture_origin) Domain ArbitraryBrushPaintTextureOrigin() { return ElementOf({ BrushPaint::TextureOrigin::kStrokeSpaceOrigin, @@ -586,9 +561,7 @@ Domain ArbitraryBrushPaintTextureOrigin() { BrushPaint::TextureOrigin::kLastStrokeInput, }); } -// LINT.ThenChange(brush_paint.h:texture_origin) -// LINT.IfChange(texture_wrap) Domain ArbitraryBrushPaintTextureWrap() { return ElementOf({ BrushPaint::TextureWrap::kRepeat, @@ -596,9 +569,7 @@ Domain ArbitraryBrushPaintTextureWrap() { BrushPaint::TextureWrap::kClamp, }); } -// LINT.ThenChange(brush_paint.h:texture_wrap) -// LINT.IfChange(blend_mode) Domain ArbitraryBrushPaintBlendMode() { return ElementOf({ BrushPaint::BlendMode::kModulate, @@ -615,7 +586,6 @@ Domain ArbitraryBrushPaintBlendMode() { BrushPaint::BlendMode::kXor, }); } -// LINT.ThenChange(brush_paint.h:blend_mode) Domain ValidBrushPaintTextureKeyframe() { return StructOf( @@ -670,7 +640,6 @@ ValidBrushPaintTextureLayerWithMappingAndAnimationFrames( StructOf(FinitePositiveFloat(), FinitePositiveFloat())); } -// LINT.IfChange(self_overlap) Domain ArbitraryBrushPaintSelfOverlap() { return ElementOf({ BrushPaint::SelfOverlap::kAny, @@ -678,7 +647,6 @@ Domain ArbitraryBrushPaintSelfOverlap() { BrushPaint::SelfOverlap::kDiscard, }); } -// LINT.ThenChange(brush_paint.h:self_overlap) Domain ValidBrushPaint(DomainVariant variant) { return FlatMap( diff --git a/ink/color/color.h b/ink/color/color.h index 047c18dd..156e79fc 100644 --- a/ink/color/color.h +++ b/ink/color/color.h @@ -60,7 +60,6 @@ class Color { // the raw premultiplied values do not specify the coordinates of the point in // the color space's gamut that corresponds to the actual color described. // - // LINT.IfChange(color_format) enum class Format { // Linear channel values with no alpha premultiplication. This format is for // graphics computations. @@ -76,7 +75,6 @@ class Color { // gamma encoding is for presentation to human end-users, while // premultiplication is for use in shader code. }; - // LINT.ThenChange(fuzz_domains.cc:color_format) // Constructs a Color from float values in the nominal range [0.0, 1.0]. By // default, this constructor accepts gamma-encoded values, since this is the diff --git a/ink/color/color_space.h b/ink/color/color_space.h index 5d732c43..f8833f75 100644 --- a/ink/color/color_space.h +++ b/ink/color/color_space.h @@ -23,13 +23,6 @@ namespace ink { // A color space, which gives concrete meaning to raw color channel values. // // This should match the platform enum in ColorExtensions.kt. -enum class ColorSpace { - // sRGB. - kSrgb, - - // Display P3, which uses the DCI-P3 primaries and sRGB transfer function. - kDisplayP3 -}; // Decodes a nonlinear perceptual lightness value to a linear luminance using // a color space's "gamma" function. This operation is also called the EOTF: diff --git a/ink/color/fuzz_domains.cc b/ink/color/fuzz_domains.cc index bbec2b6a..fbdc1ddb 100644 --- a/ink/color/fuzz_domains.cc +++ b/ink/color/fuzz_domains.cc @@ -42,14 +42,12 @@ Domain> FourFloatsInZeroOne() { InRange(0.0f, 1.0f)); } -// LINT.IfChange(color_space) Domain ArbitraryColorSpace() { return ElementOf({ ColorSpace::kSrgb, ColorSpace::kDisplayP3, }); } -// LINT.ThenChange(color_space.h:color_space) Domain ArbitraryColor() { return Map( @@ -70,7 +68,6 @@ Domain ArbitraryColor() { InRange(0.0f, 1.0f), ArbitraryColorSpace()); } -// LINT.IfChange(color_format) Domain ArbitraryColorFormat() { return ElementOf({ Color::Format::kLinear, @@ -78,7 +75,6 @@ Domain ArbitraryColorFormat() { Color::Format::kPremultipliedAlpha, }); } -// LINT.ThenChange(color.h:color_format) Domain InGamutSrgbColor() { return Map( diff --git a/ink/geometry/fuzz_domains.cc b/ink/geometry/fuzz_domains.cc index 9ac12753..e69fbcb0 100644 --- a/ink/geometry/fuzz_domains.cc +++ b/ink/geometry/fuzz_domains.cc @@ -42,7 +42,6 @@ fuzztest::Domain NotNanFloat() { fuzztest::Arbitrary()); } -// LINT.IfChange(attribute_id) fuzztest::Domain StandardAttributeId() { return fuzztest::ElementOf({ MeshFormat::AttributeId::kPosition, @@ -71,7 +70,6 @@ fuzztest::Domain CustomAttributeId() { MeshFormat::AttributeId::kCustom9, }); } -// LINT.ThenChange(mesh_format.h:attribute_id) fuzztest::Domain ArbitraryAttributeId() { return fuzztest::OneOf(StandardAttributeId(), CustomAttributeId()); @@ -105,7 +103,6 @@ fuzztest::Domain NormalizedAngle() { AngleInRange(Angle(), kFullTurn)); } -// LINT.IfChange(attribute_types) fuzztest::Domain ArbitraryMeshAttributeType() { return fuzztest::ElementOf({ MeshFormat::AttributeType::kFloat1Unpacked, @@ -130,7 +127,6 @@ fuzztest::Domain PositionMeshAttributeType() { MeshFormat::AttributeType::kFloat2PackedInOneFloat, }); } -// LINT.ThenChange(mesh_format.h:attribute_types) fuzztest::Domain ArbitraryMeshFormat() { return fuzztest::FlatMap( @@ -172,14 +168,12 @@ fuzztest::Domain ArbitraryMeshFormat() { fuzztest::InRange(1, MeshFormat::MaxAttributes())); } -// LINT.IfChange(index_formats) fuzztest::Domain ArbitraryMeshIndexFormat() { return fuzztest::ElementOf({ MeshFormat::IndexFormat::k16BitUnpacked16BitPacked, MeshFormat::IndexFormat::k32BitUnpacked16BitPacked, }); } -// LINT.ThenChange() fuzztest::Domain ArbitraryPoint() { return fuzztest::StructOf(fuzztest::Arbitrary(), diff --git a/ink/geometry/mesh_format.h b/ink/geometry/mesh_format.h index 5795aad2..2c0925de 100644 --- a/ink/geometry/mesh_format.h +++ b/ink/geometry/mesh_format.h @@ -75,7 +75,6 @@ class MeshFormat { // recommended to use packed attribute types only, since otherwise the // serialization will be lossy. // - // LINT.IfChange(attribute_types) enum class AttributeType : uint8_t { // One float, stored unchanged and losslessly, even in a packed mesh. kFloat1Unpacked, @@ -145,10 +144,6 @@ class MeshFormat { // [3] : 0x000000, 0x000000, 0x03FFFF kFloat4PackedInThreeFloats, }; - // LINT.ThenChange( - // fuzz_domains.cc:attribute_types, - // ../storage/proto/mesh.proto:attribute_types, - // ) // Indicates what a vertex attribute is used for or represents. `MeshFormat`, // `Mesh`, and `MutableMesh` do not actually interact with attribute ID values @@ -156,7 +151,6 @@ class MeshFormat { // // The `kCustomN` values may be used for custom, client-specific IDs. // - // LINT.IfChange(attribute_id) enum class AttributeId : uint8_t { kPosition, kColorShiftHsl, @@ -179,10 +173,6 @@ class MeshFormat { kCustom8, kCustom9, }; - // LINT.ThenChange( - // fuzz_domains.cc:attribute_id, - // ../storage/proto/mesh.proto:attribute_id, - // ) // An attribute stored on the vertex. struct Attribute { @@ -204,12 +194,10 @@ class MeshFormat { // e.g. `k32BitUnpacked16BitPacked` means that `MutableMesh` uses 32-bit // indices and `Mesh` uses 16-bit indices. // TODO: b/295166196 - Delete this once `MutableMesh` uses 16-bit indices. - // LINT.IfChange(index_formats) enum class IndexFormat : uint8_t { k16BitUnpacked16BitPacked, k32BitUnpacked16BitPacked, }; - // LINT.ThenChange(fuzz_domains.cc:index_formats) // Constructs a `MeshFormat` with a single attribute with type // `kFloat2Unpacked` and ID `kPosition`, and index format diff --git a/ink/rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h b/ink/rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h index 2e35fb4f..10ec9ef4 100644 --- a/ink/rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h +++ b/ink/rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h @@ -106,14 +106,10 @@ inline constexpr absl::string_view kSkSLVertexShaderHelpers = // See comments on `calculateAntialiasingAndPositionOutset()` below for some // more information on the definitions of "side", "forward" and "margin". // - // LINT.IfChange(margin_encoding) R"( float2 decodeMargins(const float2 labels) { return (4.0 / 126.0) * max(abs(labels) - float2(1.0), float2(0.0)); })" - // LINT.ThenChange( - // ../../../strokes/internal/stroke_vertex.cc:margin_encoding, - // ../../../strokes/internal/stroke_vertex.h:margin_encoding) // Computes per-vertex properties needed for antialiasing and returns an // offset that should be added to `varyings.position`. @@ -321,7 +317,6 @@ inline constexpr absl::string_view kSkSLVertexShaderHelpers = // Unpacks a combined position-and-opacity value into a `float3` from one of // the "packed" types supported. - // LINT.IfChange(opacity_packing) R"( float3 unpackPositionAndOpacityShift(const float4 unpackingTransform, const float2 packedValue) { @@ -335,12 +330,9 @@ inline constexpr absl::string_view kSkSLVertexShaderHelpers = unpackFloat2PackedIntoUByte3(unpackingTransform, packedValue.xyz), (255.0 / 127.0) * packedValue.w - 1.0); })" - // LINT.ThenChange( - // ../../../strokes/internal/stroke_vertex.cc:margin_encoding) // Unpacks a combined derivative-and-label value into a `float3` from one of // the supported "packed" types. - // LINT.IfChange(label_packing) R"( float3 unpackDerivativeAndLabel(const float4 unusedUnpackingTransform, const float3 unpackedValue) { @@ -352,12 +344,9 @@ inline constexpr absl::string_view kSkSLVertexShaderHelpers = unpackFloat2PackedIntoUByte3(unpackingTransform, packedValue.xyz), 255.0 * packedValue.w - 128.0); })" - // LINT.ThenChange( - // ../../../strokes/internal/stroke_vertex.cc:label_packing) // Unpacks an HSL color-shift value into a `float3` from one of the // supported "packed" types. - // LINT.IfChange(hsl_packing) R"( float3 unpackHSLColorShift(const float3 unpackedValue) { return unpackedValue; @@ -371,12 +360,9 @@ inline constexpr absl::string_view kSkSLVertexShaderHelpers = 511.0 - float3(1.0); })" - // LINT.ThenChange( - // ../../../strokes/internal/stroke_vertex.cc:hsl_packing) // Unpacks a surface UV value into a `float2` from one of the supported // "packed" types. - // LINT.IfChange(uv_packing) R"( float2 unpackSurfaceUv(const float2 unpackedValue) { return unpackedValue; @@ -430,12 +416,9 @@ inline constexpr absl::string_view kSkSLVertexShaderHelpers = 65280.0 * float(packedValue.z) + 255.0 * float(packedValue.w)) / 1048575.0); })" - // LINT.ThenChange( - // ../../../strokes/internal/stroke_vertex.cc:uv_packing) // Unpacks an animation offset value into a `float` from one of the // supported "packed" types. - // LINT.IfChange(anim_packing) R"( float unpackAnimationOffset(const float unpackedValue) { return unpackedValue; @@ -450,8 +433,6 @@ inline constexpr absl::string_view kSkSLVertexShaderHelpers = float unpackAnimationOffset(const half packedValue) { return float(packedValue); })" - // LINT.ThenChange( - // ../../../strokes/internal/stroke_vertex.cc:anim_packing) ""; } // namespace ink::skia_common_internal diff --git a/ink/storage/proto/brush_family.proto b/ink/storage/proto/brush_family.proto index 2c157409..a6498780 100644 --- a/ink/storage/proto/brush_family.proto +++ b/ink/storage/proto/brush_family.proto @@ -198,7 +198,6 @@ message BrushTip { // Parameters that describe how a stroke mesh should be rendered. message BrushPaint { message TextureLayer { - // LINT.IfChange(texture_wrap) // Texture wrapping modes for specifying `TextureLayer::wrap_x` and // `wrap_y`. @@ -218,9 +217,7 @@ message BrushPaint { // solid color. WRAP_CLAMP = 3; } - // LINT.ThenChange(../../brush/brush_paint.h:texture_wrap) - // LINT.IfChange(texture_size_unit) // Units for specifying `TextureLayer::size`. enum SizeUnit { @@ -234,9 +231,7 @@ message BrushPaint { reserved 3; } - // LINT.ThenChange(../../brush/brush_paint.h:texture_size_unit) - // LINT.IfChange(texture_origin) // Specification of the origin point to use for the texture. enum Origin { @@ -254,9 +249,7 @@ message BrushPaint { // for an in-progress stroke will move as more inputs are added. ORIGIN_LAST_STROKE_INPUT = 3; } - // LINT.ThenChange(../../brush/brush_paint.h:texture_origin) - // LINT.IfChange(texture_mapping) // Specification of how the texture should be applied to the stroke. enum Mapping { @@ -273,9 +266,7 @@ message BrushPaint { // stroke, scaled or rotated appropriately to cover the whole particle. MAPPING_STAMPING = 2; } - // LINT.ThenChange(../../brush/brush_paint.h:texture_mapping) - // LINT.IfChange(blend_mode) // Setting for how an incoming ("source" / "src") color should be combined // with the already present ("destination" / "dst") color at a given pixel. @@ -381,7 +372,6 @@ message BrushPaint { // Color = (1 - Alpha_dst) * Color_src + (1 - Alpha_src) * Color_dst BLEND_MODE_XOR = 12; } - // LINT.ThenChange(../../brush/brush_paint.h:blend_mode) // String id that will be used by renderers to retrieve the color texture. optional string client_texture_id = 1; @@ -452,14 +442,12 @@ message BrushPaint { // opacity variations (e.g. with // `BrushBehavior::Target::HUE_OFFSET_IN_RADIANS`), or complex textures (e.g. // with `TextureMapping::kStamping`). - // LINT.IfChange(self_overlap) enum SelfOverlap { SELF_OVERLAP_UNSPECIFIED = 0; SELF_OVERLAP_ANY = 1; SELF_OVERLAP_ACCUMULATE = 2; SELF_OVERLAP_DISCARD = 3; } - // LINT.ThenChange(../../brush/brush_paint.h:self_overlap) // Zero or more textures to blend together to affect this coat's appearance. // Each layer is blended into the next one, and finally into the color of the @@ -548,7 +536,6 @@ message BrushPaint { // may be constrained to keep them from changing too rapidly with respect to // distance traveled from one input to the next. message BrushBehavior { - // LINT.IfChange(source) // A stroke input property, along with its units, that can act as a source for // a `BrushBehavior.SourceNode`. @@ -759,9 +746,7 @@ message BrushBehavior { // This value changes for each input as inputs are added. SOURCE_DISTANCE_REMAINING_AS_FRACTION_OF_STROKE_LENGTH = 39; } - // LINT.ThenChange(../../brush/brush_behavior.h:source) - // LINT.IfChange(target) // `BrushTip` properties that can be modified by a `BrushBehavior`. enum Target { @@ -861,9 +846,7 @@ message BrushBehavior { reserved 16; reserved 17; } - // LINT.ThenChange(../../brush/brush_behavior.h:target) - // LINT.IfChange(polar_target) // Like `Target`, but for vector values. enum PolarTarget { @@ -888,9 +871,7 @@ message BrushBehavior { // negative Y-axis. POLAR_POSITION_OFFSET_RELATIVE_IN_RADIANS_AND_MULTIPLES_OF_BRUSH_SIZE = 2; } - // LINT.ThenChange(../../brush/brush_behavior.h:polar_target) - // LINT.IfChange(out_of_range) // The desired behavior when an input value is outside the bounds of // `source_value_range`. @@ -915,9 +896,7 @@ message BrushBehavior { // `OUT_OF_RANGE_REPEAT`. OUT_OF_RANGE_MIRROR = 3; } - // LINT.ThenChange(../../brush/brush_behavior.h:out_of_range) - // LINT.IfChange(optional_input_property) // List of input properties that might not be reported by `StrokeInput`. enum OptionalInputProperty { @@ -929,9 +908,7 @@ message BrushBehavior { // Tilt-x and tilt-y require both tilt and orientation to be reported. OPTIONAL_INPUT_TILT_X_AND_Y = 4; } - // LINT.ThenChange(../../brush/brush_behavior.h:optional_input_property) - // LINT.IfChange(binary_op) // A binary operation for combining two values in a `BinaryOpNode`. enum BinaryOp { @@ -943,9 +920,7 @@ message BrushBehavior { // A + B, or null if either is null BINARY_OP_SUM = 2; } - // LINT.ThenChange(../../brush/brush_behavior.h:binary_op) - // LINT.IfChange(damping_source) // Dimensions/units for measuring the `damping_gap` field of a `DampingNode`. enum DampingSource { @@ -967,9 +942,7 @@ message BrushBehavior { // `damping_gap` is measured in multiples of the brush size. DAMPING_SOURCE_DISTANCE_IN_MULTIPLES_OF_BRUSH_SIZE = 3; } - // LINT.ThenChange(../../brush/brush_behavior.h:damping_source) - // LINT.IfChange(interpolation) // An interpolation function for combining three values in an // `InterpolationNode`. @@ -984,7 +957,6 @@ message BrushBehavior { // interpolating linearly in between. Outputs null if B=C. INTERPOLATION_INVERSE_LERP = 2; } - // LINT.ThenChange(../../brush/brush_behavior.h:interpolation) // A single node in a behavior's graph. Each node type is either a "value // node" which consumes zero or more input values and produces a single output @@ -1240,7 +1212,6 @@ message ColorFunction { } } -// LINT.IfChange(predefined) // Specifies a predefined easing function. enum PredefinedEasingFunction { @@ -1277,7 +1248,6 @@ enum PredefinedEasingFunction { // https://www.w3.org/TR/css-easing-1/#step-easing-functions PREDEFINED_EASING_STEP_END = 7; } -// LINT.ThenChange(../../brush/easing_function.h:predefined) // Parameters for a custom cubic Bezier easing function. // @@ -1328,7 +1298,6 @@ message LinearEasingFunction { repeated float y = 2 [packed = true]; } -// LINT.IfChange(step_position) // Setting to determine the desired output value of the first and last // step of [0, 1) for the Steps EasingFunction. See below for more context. @@ -1355,7 +1324,6 @@ enum StepPosition { // * for x in [1 - 1/step_count, 1) => y = 1 - 1/(step_count + 1) STEP_POSITION_JUMP_BOTH = 4; } -// LINT.ThenChange(../../brush/easing_function.h:step_position) // Parameters for a custom step easing function. // diff --git a/ink/storage/proto/color.proto b/ink/storage/proto/color.proto index 8f67a7d6..6aa00e49 100644 --- a/ink/storage/proto/color.proto +++ b/ink/storage/proto/color.proto @@ -21,7 +21,6 @@ package ink.proto; option java_package = "com.google.ink.proto"; option java_outer_classname = "ColorProto"; -// LINT.IfChange(color_space) enum ColorSpace { // UNSPECIFIED exists only to signal unset instances; client code should never // set a ColorSpace to this value. @@ -34,7 +33,6 @@ enum ColorSpace { // Display P3, which uses the DCI-P3 primaries and sRGB transfer function. COLOR_SPACE_DISPLAY_P3 = 2; } -// LINT.ThenChange(../../color/color_space.h:color_space) // WARNING: Unless you're an expert, DO NOT populate this proto manually. The // color channel values stored here are linear, whereas typical human-readable diff --git a/ink/storage/proto/mesh.proto b/ink/storage/proto/mesh.proto index 8dcface9..d28b96a0 100644 --- a/ink/storage/proto/mesh.proto +++ b/ink/storage/proto/mesh.proto @@ -101,7 +101,6 @@ message CodedModeledShape { // A format specification for mesh data. message MeshFormat { - // LINT.IfChange(attribute_types) enum AttributeType { ATTR_TYPE_UNSPECIFIED = 0; ATTR_TYPE_FLOAT1_UNPACKED = 1; @@ -119,9 +118,7 @@ message MeshFormat { ATTR_TYPE_FLOAT1_PACKED_IN_ONE_BYTE = 13; ATTR_TYPE_FLOAT3_PACKED_IN_FOUR_BYTES_XYZ10 = 14; } - // LINT.ThenChange(../../geometry/mesh_format.h:attribute_types) - // LINT.IfChange(attribute_id) enum AttributeId { ATTR_ID_UNSPECIFIED = 0; ATTR_ID_POSITION = 1; @@ -151,7 +148,6 @@ message MeshFormat { ATTR_ID_CUSTOM9 = 73; reserved 74 to 127; // Reserved for future custom attribute IDs. } - // LINT.ThenChange(../../geometry/mesh_format.h:attribute_id) // The size/type of each vertex attribute. This must, at the very least, // include a 2-component position attribute. diff --git a/ink/strokes/input/fuzz_domains.cc b/ink/strokes/input/fuzz_domains.cc index 9c48c69e..a530720f 100644 --- a/ink/strokes/input/fuzz_domains.cc +++ b/ink/strokes/input/fuzz_domains.cc @@ -123,7 +123,6 @@ fuzztest::Domain StrokeInputBatchWithPositionsAndMinSize( } // namespace -// LINT.IfChange(tool_types) fuzztest::Domain ArbitraryToolType() { return fuzztest::ElementOf({ StrokeInput::ToolType::kUnknown, @@ -132,7 +131,6 @@ fuzztest::Domain ArbitraryToolType() { StrokeInput::ToolType::kStylus, }); } -// LINT.ThenChange(stroke_input.h:tool_types) fuzztest::Domain ValidStrokeInput() { return fuzztest::StructOf( diff --git a/ink/strokes/internal/brush_tip_extruder/geometry.cc b/ink/strokes/internal/brush_tip_extruder/geometry.cc index 52b8b956..0cb4b9cb 100644 --- a/ink/strokes/internal/brush_tip_extruder/geometry.cc +++ b/ink/strokes/internal/brush_tip_extruder/geometry.cc @@ -2325,7 +2325,6 @@ Geometry::TriangleBuilder::TriangleBuilder( intersection_travel_limit_(intersection_travel_limit), retriangulation_travel_threshold_(retriangulation_travel_threshold) {} -// LINT.IfChange bool Geometry::TriangleBuilder::SidesTouch(const SlowPathTriangleInfo& info) { return DistanceBetween(info.proposed_vertex.position, info.opposite_position) == 0 || @@ -2997,7 +2996,6 @@ void Geometry::TriangleBuilder::HandleNonCcwBothSidesIntersectingTriangle( *info.opposite_side, end_intersection_vertex, start_opposite_outline); } } -// LINT.ThenChange(./line_mesh_generation.md) void Geometry::SetVertex(MutableMeshView::IndexType index, const ExtrudedVertex& new_vertex, diff --git a/ink/strokes/internal/stroke_input_modeler/spring_based_input_modeler.cc b/ink/strokes/internal/stroke_input_modeler/spring_based_input_modeler.cc index e8dd6b07..f0a2a0be 100644 --- a/ink/strokes/internal/stroke_input_modeler/spring_based_input_modeler.cc +++ b/ink/strokes/internal/stroke_input_modeler/spring_based_input_modeler.cc @@ -56,8 +56,6 @@ const stroke_model::Duration kDefaultLoopMitigationMinSpeedSamplingWindow = // curves on 60 Hz touchscreens. constexpr double kMinOutputRateHz = 180; -// LINT.IfChange(input_model_types) - PositionModelerParams::LoopContractionMitigationParameters MakeLoopContractionMitigationParameters( SpringBasedInputModeler::Version version, @@ -104,8 +102,6 @@ SamplingParams MakeSamplingParams(SpringBasedInputModeler::Version version, } } -// LINT.ThenChange(../../../brush/brush_family.h:input_model_types) - void ResetStrokeModeler(stroke_model::StrokeModeler& stroke_modeler, SpringBasedInputModeler::Version version, float brush_epsilon, diff --git a/ink/strokes/internal/stroke_input_modeler_test.cc b/ink/strokes/internal/stroke_input_modeler_test.cc index e972152c..d67b7f64 100644 --- a/ink/strokes/internal/stroke_input_modeler_test.cc +++ b/ink/strokes/internal/stroke_input_modeler_test.cc @@ -422,7 +422,6 @@ TEST_P(StrokeInputModelerTest, StartWithZeroEpsilon) { INSTANTIATE_TEST_SUITE_P( TestInputModels, StrokeInputModelerTest, - // LINT.IfChange(input_model_types) ::testing::ValuesIn({ {"SpringModel", {BrushFamily::SpringModel{}}}, {"NaiveModel", {BrushFamily::ExperimentalNaiveModel{}}}, @@ -436,7 +435,6 @@ INSTANTIATE_TEST_SUITE_P( .window_size = Duration32::Millis(1500), .upsampling_period = Duration32::Infinite()}}}, }), - // LINT.ThenChange(../../brush/brush_family.h:input_model_types) [](const ::testing::TestParamInfo& info) { return info.param.test_name; }); diff --git a/ink/strokes/internal/stroke_vertex.cc b/ink/strokes/internal/stroke_vertex.cc index b7769474..ffe79c27 100644 --- a/ink/strokes/internal/stroke_vertex.cc +++ b/ink/strokes/internal/stroke_vertex.cc @@ -39,7 +39,6 @@ namespace { using ::ink::geometry_internal::Lerp; using ::ink::geometry_internal::LinearMap; -// LINT.IfChange(margin_encoding) // The code below specifies how a vertex category and margin are encoded // together inside a `float`. The implementation below currently does encoding // and decoding linearly. @@ -70,8 +69,6 @@ float StrokeVertex::Label::DecodeMargin() const { return LinearMap(std::abs(encoded_value), kRangeOfEncodedMarginValues, {0.f, kMaximumMargin}); } -// LINT.ThenChange( -// ../../rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h:margin_encoding) namespace { @@ -85,45 +82,30 @@ std::optional GetCustomPackingParams( // Color-shift components are each stored unpacked in the range [-1, 1]. In // order to accurately store 0, we only use 2^N - 2 values instead of the full // 2^N - 1 representable by the N packed bits. - // LINT.IfChange(opacity_packing) constexpr MeshAttributeCodingParams::ComponentCodingParams kOpacityCodingParams8bit = {.offset = -1, .scale = 2.f / 254}; - // LINT.ThenChange( - // ../../rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h:opacity_packing) - // LINT.IfChange(hsl_packing) constexpr MeshAttributeCodingParams::ComponentCodingParams kHslCodingParams10bit = {.offset = -1, .scale = 2.f / 1022}; - // LINT.ThenChange( - // ../../rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h:hsl_packing) - // LINT.IfChange(label_packing) // Vertex labels are already represented with 1 byte's worth of integral // values, but in the range [-127, 127]. They only need to be shifted to fit // in [0, 255]. constexpr MeshAttributeCodingParams::ComponentCodingParams kLabelCodingParams = {.offset = -128, .scale = 1}; - // LINT.ThenChange( - // ../../rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h:label_packing) - // LINT.IfChange(uv_packing) constexpr MeshAttributeCodingParams::ComponentCodingParams kSurfaceUCodingParams12bit = {.scale = 1.f / 4095}; constexpr MeshAttributeCodingParams::ComponentCodingParams kSurfaceVCodingParams12bit = {.scale = 1.f / 4095}; constexpr MeshAttributeCodingParams::ComponentCodingParams kSurfaceVCodingParams20bit = {.scale = 1.f / 1048575}; - // LINT.ThenChange( - // ../../rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h:uv_packing) // Animation offsets are stored unpacked in the range [0, 1). It's tempting to // use 1/256 as the scale here, since a value of 1 does not need to be // representable, but due to rounding this would make values just less than 1 // also unrepresentable (see b/432526862), so we use 1/255 instead. - // LINT.IfChange(anim_packing) constexpr MeshAttributeCodingParams::ComponentCodingParams kAnimationCodingParams8bit = {.scale = 1.f / 255}; - // LINT.ThenChange( - // ../../rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h:anim_packing) switch (attribute.id) { case MeshFormat::AttributeId::kOpacityShift: diff --git a/ink/strokes/internal/stroke_vertex.h b/ink/strokes/internal/stroke_vertex.h index 78c84057..04617e0a 100644 --- a/ink/strokes/internal/stroke_vertex.h +++ b/ink/strokes/internal/stroke_vertex.h @@ -94,10 +94,7 @@ struct StrokeVertex { // most that a vertex can be moved as a multiple of approximate stroke width. // In other words, the position outset distance will be capped once the stroke // is as small as 1/kMaximumMargin-th of a pixel. - // LINT.IfChange(margin_encoding) static constexpr float kMaximumMargin = 4; - // LINT.ThenChange( - // ../../rendering/skia/common_internal/sksl_vertex_shader_helper_functions.h:margin_encoding) // Constant value used by interior vertices. static constexpr Label kInteriorLabel = {0};