Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions ink/brush/brush_behavior.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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).
Expand All @@ -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 ///
Expand Down
4 changes: 0 additions & 4 deletions ink/brush/brush_family.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -71,8 +69,6 @@ class BrushFamily {
using InputModel =
std::variant<SpringModel, ExperimentalNaiveModel, SlidingWindowModel>;

// 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();
Expand Down
5 changes: 0 additions & 5 deletions ink/brush/brush_paint.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down Expand Up @@ -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 {
Expand Down
32 changes: 0 additions & 32 deletions ink/brush/fuzz_domains.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,35 +123,28 @@ Domain<BrushBehavior::EnabledToolTypes> ValidBrushBehaviorEnabledToolTypes() {
Arbitrary<bool>()));
}

// LINT.IfChange(binary_op)
Domain<BrushBehavior::BinaryOp> ArbitraryBrushBehaviorBinaryOp() {
return ElementOf({
BrushBehavior::BinaryOp::kProduct,
BrushBehavior::BinaryOp::kSum,
});
}
// LINT.ThenChange(brush_behavior.h:binary_op)

// LINT.IfChange(damping_source)
Domain<BrushBehavior::DampingSource> ArbitraryBrushBehaviorDampingSource() {
return ElementOf({
BrushBehavior::DampingSource::kDistanceInCentimeters,
BrushBehavior::DampingSource::kDistanceInMultiplesOfBrushSize,
BrushBehavior::DampingSource::kTimeInSeconds,
});
}
// LINT.ThenChange(brush_behavior.h:damping_source)

// LINT.IfChange(interpolation)
Domain<BrushBehavior::Interpolation> ArbitraryBrushBehaviorInterpolation() {
return ElementOf({
BrushBehavior::Interpolation::kLerp,
BrushBehavior::Interpolation::kInverseLerp,
});
}
// LINT.ThenChange(brush_behavior.h:interpolation)

// LINT.IfChange(optional_input_property)
Domain<BrushBehavior::OptionalInputProperty>
ArbitraryBrushBehaviorOptionalInputProperty() {
return ElementOf({
Expand All @@ -161,9 +154,7 @@ ArbitraryBrushBehaviorOptionalInputProperty() {
BrushBehavior::OptionalInputProperty::kTiltXAndY,
});
}
// LINT.ThenChange(brush_behavior.h:optional_input_property)

// LINT.IfChange(out_of_range)
Domain<BrushBehavior::OutOfRange> ArbitraryBrushBehaviorOutOfRange() {
return ElementOf({
BrushBehavior::OutOfRange::kClamp,
Expand All @@ -181,9 +172,7 @@ Domain<BrushBehavior::OutOfRange> ValidBrushBehaviorOutOfRangeForSource(
return ArbitraryBrushBehaviorOutOfRange();
}
}
// LINT.ThenChange(brush_behavior.h:out_of_range)

// LINT.IfChange(source)
Domain<BrushBehavior::Source> ArbitraryBrushBehaviorSource() {
return ElementOf({
BrushBehavior::Source::kNormalizedPressure,
Expand Down Expand Up @@ -233,9 +222,7 @@ Domain<BrushBehavior::Source> ArbitraryBrushBehaviorSource() {
BrushBehavior::Source::kDistanceRemainingAsFractionOfStrokeLength,
});
}
// LINT.ThenChange(brush_behavior.h:source)

// LINT.IfChange(target)
Domain<BrushBehavior::Target> ArbitraryBrushBehaviorTarget(
DomainVariant variant) {
std::vector<BrushBehavior::Target> targets = {
Expand All @@ -261,9 +248,7 @@ Domain<BrushBehavior::Target> ArbitraryBrushBehaviorTarget(
}
return ElementOf(targets);
}
// LINT.ThenChange(brush_behavior.h:target)

// LINT.IfChange(polar_target)
Domain<BrushBehavior::PolarTarget> ArbitraryBrushBehaviorPolarTarget() {
return ElementOf({
BrushBehavior::PolarTarget::
Expand All @@ -272,7 +257,6 @@ Domain<BrushBehavior::PolarTarget> ArbitraryBrushBehaviorPolarTarget() {
kPositionOffsetRelativeInRadiansAndMultiplesOfBrushSize,
});
}
// LINT.ThenChange(brush_behavior.h:polar_target)

Domain<ColorFunction::OpacityMultiplier> ValidColorFunctionOpacityMultiplier() {
return StructOf<ColorFunction::OpacityMultiplier>(FiniteNonNegativeFloat());
Expand All @@ -282,7 +266,6 @@ Domain<ColorFunction::ReplaceColor> ValidColorFunctionReplaceColor() {
return StructOf<ColorFunction::ReplaceColor>(ArbitraryColor());
}

// LINT.IfChange(predefined)
Domain<EasingFunction::Predefined> ArbitraryEasingFunctionPredefined() {
return ElementOf({
EasingFunction::Predefined::kLinear,
Expand All @@ -294,7 +277,6 @@ Domain<EasingFunction::Predefined> ArbitraryEasingFunctionPredefined() {
EasingFunction::Predefined::kStepEnd,
});
}
// LINT.ThenChange(easing_function.h:predefined)

Domain<EasingFunction::CubicBezier> ValidEasingFunctionCubicBezier() {
return StructOf<EasingFunction::CubicBezier>(
Expand Down Expand Up @@ -323,12 +305,10 @@ Domain<EasingFunction::Steps> ValidEasingFunctionSteps() {
.step_position = step_position};
},
InRange<int32_t>(1, std::numeric_limits<int32_t>::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<BrushBehavior::SourceNode> ValidBrushBehaviorSourceNode() {
Expand Down Expand Up @@ -560,45 +540,36 @@ Domain<BrushFamily::InputModel> ValidBrushFamilyInputModel() {

namespace {

// LINT.IfChange(texture_size_unit)
Domain<BrushPaint::TextureSizeUnit> ArbitraryBrushPaintTextureSizeUnit() {
return ElementOf({
BrushPaint::TextureSizeUnit::kBrushSize,
BrushPaint::TextureSizeUnit::kStrokeCoordinates,
});
}
// LINT.ThenChange(brush_paint.h:texture_size_unit)

// LINT.IfChange(texture_mapping)
Domain<BrushPaint::TextureMapping> ArbitraryBrushPaintTextureMapping() {
return ElementOf({
BrushPaint::TextureMapping::kTiling,
BrushPaint::TextureMapping::kStamping,
});
}
// LINT.ThenChange(brush_paint.h:texture_mapping)

// LINT.IfChange(texture_origin)
Domain<BrushPaint::TextureOrigin> ArbitraryBrushPaintTextureOrigin() {
return ElementOf({
BrushPaint::TextureOrigin::kStrokeSpaceOrigin,
BrushPaint::TextureOrigin::kFirstStrokeInput,
BrushPaint::TextureOrigin::kLastStrokeInput,
});
}
// LINT.ThenChange(brush_paint.h:texture_origin)

// LINT.IfChange(texture_wrap)
Domain<BrushPaint::TextureWrap> ArbitraryBrushPaintTextureWrap() {
return ElementOf({
BrushPaint::TextureWrap::kRepeat,
BrushPaint::TextureWrap::kMirror,
BrushPaint::TextureWrap::kClamp,
});
}
// LINT.ThenChange(brush_paint.h:texture_wrap)

// LINT.IfChange(blend_mode)
Domain<BrushPaint::BlendMode> ArbitraryBrushPaintBlendMode() {
return ElementOf({
BrushPaint::BlendMode::kModulate,
Expand All @@ -615,7 +586,6 @@ Domain<BrushPaint::BlendMode> ArbitraryBrushPaintBlendMode() {
BrushPaint::BlendMode::kXor,
});
}
// LINT.ThenChange(brush_paint.h:blend_mode)

Domain<BrushPaint::TextureKeyframe> ValidBrushPaintTextureKeyframe() {
return StructOf<BrushPaint::TextureKeyframe>(
Expand Down Expand Up @@ -670,15 +640,13 @@ ValidBrushPaintTextureLayerWithMappingAndAnimationFrames(
StructOf<Vec>(FinitePositiveFloat(), FinitePositiveFloat()));
}

// LINT.IfChange(self_overlap)
Domain<BrushPaint::SelfOverlap> ArbitraryBrushPaintSelfOverlap() {
return ElementOf({
BrushPaint::SelfOverlap::kAny,
BrushPaint::SelfOverlap::kAccumulate,
BrushPaint::SelfOverlap::kDiscard,
});
}
// LINT.ThenChange(brush_paint.h:self_overlap)

Domain<BrushPaint> ValidBrushPaint(DomainVariant variant) {
return FlatMap(
Expand Down
2 changes: 0 additions & 2 deletions ink/color/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
7 changes: 0 additions & 7 deletions ink/color/color_space.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions ink/color/fuzz_domains.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ Domain<std::array<float, 4>> FourFloatsInZeroOne() {
InRange(0.0f, 1.0f));
}

// LINT.IfChange(color_space)
Domain<ColorSpace> ArbitraryColorSpace() {
return ElementOf({
ColorSpace::kSrgb,
ColorSpace::kDisplayP3,
});
}
// LINT.ThenChange(color_space.h:color_space)

Domain<Color> ArbitraryColor() {
return Map(
Expand All @@ -70,15 +68,13 @@ Domain<Color> ArbitraryColor() {
InRange(0.0f, 1.0f), ArbitraryColorSpace());
}

// LINT.IfChange(color_format)
Domain<Color::Format> ArbitraryColorFormat() {
return ElementOf({
Color::Format::kLinear,
Color::Format::kGammaEncoded,
Color::Format::kPremultipliedAlpha,
});
}
// LINT.ThenChange(color.h:color_format)

Domain<Color> InGamutSrgbColor() {
return Map(
Expand Down
6 changes: 0 additions & 6 deletions ink/geometry/fuzz_domains.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ fuzztest::Domain<float> NotNanFloat() {
fuzztest::Arbitrary<float>());
}

// LINT.IfChange(attribute_id)
fuzztest::Domain<MeshFormat::AttributeId> StandardAttributeId() {
return fuzztest::ElementOf({
MeshFormat::AttributeId::kPosition,
Expand Down Expand Up @@ -71,7 +70,6 @@ fuzztest::Domain<MeshFormat::AttributeId> CustomAttributeId() {
MeshFormat::AttributeId::kCustom9,
});
}
// LINT.ThenChange(mesh_format.h:attribute_id)

fuzztest::Domain<MeshFormat::AttributeId> ArbitraryAttributeId() {
return fuzztest::OneOf(StandardAttributeId(), CustomAttributeId());
Expand Down Expand Up @@ -105,7 +103,6 @@ fuzztest::Domain<Angle> NormalizedAngle() {
AngleInRange(Angle(), kFullTurn));
}

// LINT.IfChange(attribute_types)
fuzztest::Domain<MeshFormat::AttributeType> ArbitraryMeshAttributeType() {
return fuzztest::ElementOf({
MeshFormat::AttributeType::kFloat1Unpacked,
Expand All @@ -130,7 +127,6 @@ fuzztest::Domain<MeshFormat::AttributeType> PositionMeshAttributeType() {
MeshFormat::AttributeType::kFloat2PackedInOneFloat,
});
}
// LINT.ThenChange(mesh_format.h:attribute_types)

fuzztest::Domain<MeshFormat> ArbitraryMeshFormat() {
return fuzztest::FlatMap(
Expand Down Expand Up @@ -172,14 +168,12 @@ fuzztest::Domain<MeshFormat> ArbitraryMeshFormat() {
fuzztest::InRange<uint8_t>(1, MeshFormat::MaxAttributes()));
}

// LINT.IfChange(index_formats)
fuzztest::Domain<MeshFormat::IndexFormat> ArbitraryMeshIndexFormat() {
return fuzztest::ElementOf({
MeshFormat::IndexFormat::k16BitUnpacked16BitPacked,
MeshFormat::IndexFormat::k32BitUnpacked16BitPacked,
});
}
// LINT.ThenChange()

fuzztest::Domain<Point> ArbitraryPoint() {
return fuzztest::StructOf<Point>(fuzztest::Arbitrary<float>(),
Expand Down
Loading
Loading