0

Roll src/third_party/ink/src/ bf387a71d..c542d619a (61 commits)

bf387a71d7..c542d619a8

$ git log bf387a71d..c542d619a --date=short --no-merges --format='%ad %ae %s'
2025-03-14 sfreilich Use an overloaded function instead of if constexpr in std::visit
2025-03-12 sfreilich Add a fuzz test for CreateClosedShape and fix bug
2025-03-12 sfreilich Add fuzz-test for CreateMeshFromPolyline
2025-03-06 sfreilich Only allow one BrushTip per BrushCoat in interface
2025-03-05 sfreilich Clean up some JNI to match naming conventions
2025-03-04 sfreilich Add result validation to DecodeBrushBehaviorNode
2025-03-04 sfreilich Small tightening of visibility
2025-03-03 ink-open-source Automated Code Change
2025-03-03 sfreilich Add JNI for wrapping BrushBehavior
2025-02-28 ink-open-source Automated Code Change
2025-02-28 sfreilich Bump rules_cc version to match resolved version
2025-02-28 sfreilich Add JNI for BrushBehavior node fields
2025-02-28 ink-open-source Automated Code Change
2025-02-28 ink-open-source Automated Code Change
2025-02-27 sfreilich Adjust JNI for creating BrushBehavior nodes
2025-02-27 sfreilich Add JNI for wrapping/reading EasingFunction
2025-02-27 ink-open-source Rename BrushPaint.TextureLayer.clientColorTextureId to BrushPaint.TextureLayer.clientTextureId.
2025-02-27 sfreilich Add JNI for reading TextureLayer
2025-02-27 sfreilich Implement JNI for BrushPaint serialization
2025-02-27 sfreilich Move JNI helper methods to ink::jni namespace
2025-02-27 sfreilich Add JNI deserializing / reading BrushTip
2025-02-27 sfreilich Add JNI deserializing BrushCoat
2025-02-26 sfreilich Remove SpringModelV1
2025-02-25 ink-open-source Automated Code Change
2025-02-24 ink-open-source Automated Code Change
2025-02-24 sfreilich Pass array of underlying pointers when constructing BrushPaint and BrushTip via JNI
2025-02-22 ink-open-source Automated Code Change
2025-02-22 ink-open-source Automated Code Change
2025-02-22 ink-open-source Automated Code Change
2025-02-22 ink-open-source Automated Code Change
2025-02-21 sfreilich Add JNI for reading and deserializing BrushFamily
2025-02-21 sfreilich Add JNI for Brush deserialization and reading Brush fields
2025-02-20 sfreilich Handle input modeler correctly when coats are in legacy format
2025-02-20 sfreilich Use the legacy spring model for BrushFamily protos without input_model set
2025-02-20 sfreilich Fix some incorrect declarations in JNI
2025-02-20 sfreilich Extract logic for parsing a proto from either a direct byte-buffer or array
2025-02-19 sfreilich Get Starlark build rules from rules_cc
2025-02-19 sfreilich Add some JNI interface for brush serialization
2025-02-18 jadrian Document why we can't compute texture animation frame index outside the shader.
2025-02-18 sfreilich Adjust JNI interface
2025-02-13 ink-open-source Support serializing arbitrary mesh attributes
2025-02-12 ink-open-source Add uniforms for texture animation progress and number of frames
2025-02-11 sfreilich Remove some unused and obsolete CodedMesh proto fields
2025-02-11 sfreilich Cache the Bazel Repository Cache with Github's actions/cache
2025-02-11 ink-open-source Allow for brush tip offsets in polar coordinates
2025-02-07 sfreilich Remove URI type and BrushProvider interface
2025-02-07 ink-open-source Ink: Remove outdated comment
2025-02-06 sfreilich Link to the Jetpack module in Ink README
2025-02-06 jadrian Document that `animation_frames` must be constant across `TextureLayer`s.
2025-02-06 sfreilich Use the newer input modeler by default
2025-02-05 ink-open-source Enforce that all TextureLayers in a BrushPaint must have the same `animation_frames`
2025-02-04 sfreilich Replace URI with string identifier in TextureLayer
2025-02-04 ink-open-source Add mesh attribute for per-particle animation offset
2025-01-31 ink-open-source Add `BrushBehavior::Target::kAnimationFrameOffset`
2025-01-30 ink-open-source Ink: Move polyline_processing_jni from geometry module to strokes module and rename to mesh_creation_jni
2025-01-30 ink-open-source Factor `FloatModulo` out of `Angle::Normalize`
2025-01-29 ink-open-source Add per-stroke random seed values for use with `BrushBehavior::NoiseNode`
2025-01-27 ink-open-source Mesh Creation Error Handling
2025-01-24 sfreilich Allow brush tips to have multiple outlines (e.g. for particle effects)
2025-01-24 ink-open-source Add `animation_frames` field to `BrushPaint`
2025-01-22 ink-open-source Fix `NoiseGenerator` to use all 64 seed bits, not just the bottom 32.

Then update third_party/ink/BUILD.gn and Ink callers to fix the build.

Created with:
  roll-dep src/third_party/ink/src

Change-Id: Ic1809f64f7f4fbbde911bfcf8bc48839ad6322eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6357997
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1433654}
This commit is contained in:
Lei Zhang
2025-03-17 11:17:53 -07:00
committed by Chromium LUCI CQ
parent e013352b67
commit 101cf0890c
6 changed files with 14 additions and 18 deletions

2
DEPS

@ -419,7 +419,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ink
# and whatever else without interference from each other.
'ink_revision': 'bf387a71d7def4b48bf24c8e09d412dfb9962746',
'ink_revision': 'c542d619a8959415beda5a76fe89ffa2f83df886',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ink_stroke_modeler
# and whatever else without interference from each other.

@ -167,7 +167,7 @@ MATCHER_P(InkStrokeBrushSizeEq, expected_size, "") {
MATCHER_P(InkStrokeDrawingBrushTypeEq, expected_type, "") {
const ink::Brush& ink_brush = arg.GetBrush();
const ink::BrushCoat& coat = ink_brush.GetCoats()[0];
float opacity = coat.tips[0].opacity_multiplier;
float opacity = coat.tip.opacity_multiplier;
if (expected_type == PdfInkBrush::Type::kPen) {
return opacity == 1.0f;
}
@ -567,9 +567,8 @@ TEST_P(PdfInkModuleTest, HandleSetAnnotationBrushMessagePen) {
EXPECT_EQ(8.0f, ink_brush.GetSize());
ASSERT_EQ(1u, ink_brush.CoatCount());
const ink::BrushCoat& coat = ink_brush.GetCoats()[0];
ASSERT_EQ(1u, coat.tips.size());
EXPECT_EQ(1.0f, coat.tips[0].corner_rounding);
EXPECT_EQ(1.0f, coat.tips[0].opacity_multiplier);
EXPECT_EQ(1.0f, coat.tip.corner_rounding);
EXPECT_EQ(1.0f, coat.tip.opacity_multiplier);
}
// Verify that a set highlighter message sets the annotation brush to a
@ -592,9 +591,8 @@ TEST_P(PdfInkModuleTest, HandleSetAnnotationBrushMessageHighlighter) {
EXPECT_EQ(4.5f, ink_brush.GetSize());
ASSERT_EQ(1u, ink_brush.CoatCount());
const ink::BrushCoat& coat = ink_brush.GetCoats()[0];
ASSERT_EQ(1u, coat.tips.size());
EXPECT_EQ(0.0f, coat.tips[0].corner_rounding);
EXPECT_EQ(0.4f, coat.tips[0].opacity_multiplier);
EXPECT_EQ(0.0f, coat.tip.corner_rounding);
EXPECT_EQ(0.4f, coat.tip.opacity_multiplier);
}
// Verify that brushes with zero color values can be set as the annotation
@ -616,9 +614,8 @@ TEST_P(PdfInkModuleTest, HandleSetAnnotationBrushMessageColorZero) {
EXPECT_EQ(4.5f, ink_brush.GetSize());
ASSERT_EQ(1u, ink_brush.CoatCount());
const ink::BrushCoat& coat = ink_brush.GetCoats()[0];
ASSERT_EQ(1u, coat.tips.size());
EXPECT_EQ(1.0f, coat.tips[0].corner_rounding);
EXPECT_EQ(1.0f, coat.tips[0].opacity_multiplier);
EXPECT_EQ(1.0f, coat.tip.corner_rounding);
EXPECT_EQ(1.0f, coat.tip.opacity_multiplier);
}
TEST_P(PdfInkModuleTest, HandleSetAnnotationModeMessage) {

@ -152,15 +152,14 @@ void SetBrushPropertiesForPath(const ink::Brush& brush, FPDF_PAGEOBJECT path) {
CHECK_EQ(brush.CoatCount(), 1u);
const ink::BrushCoat& coat = brush.GetCoats()[0];
CHECK_EQ(coat.tips.size(), 1u);
// third_party/ink/src/ink/brush/brush_tip.h says this can have a value up to
// 2.0f, but that should never be the case, as //pdf code never sets it that
// high.
CHECK_LE(coat.tips[0].opacity_multiplier, 1.0f);
CHECK_LE(coat.tip.opacity_multiplier, 1.0f);
bool result = FPDFPageObj_SetFillColor(path, SkColorGetR(color),
SkColorGetG(color), SkColorGetB(color),
coat.tips[0].opacity_multiplier * 255);
coat.tip.opacity_multiplier * 255);
CHECK(result);
}

@ -49,6 +49,8 @@ source_set("ink") {
"src/ink/geometry/internal/mesh_constants.h",
"src/ink/geometry/internal/mesh_packing.cc",
"src/ink/geometry/internal/mesh_packing.h",
"src/ink/geometry/internal/modulo.cc",
"src/ink/geometry/internal/modulo.h",
"src/ink/geometry/internal/static_rtree.cc",
"src/ink/geometry/internal/static_rtree.h",
"src/ink/geometry/intersects.cc",
@ -167,8 +169,6 @@ source_set("ink") {
"src/ink/types/physical_distance.cc",
"src/ink/types/physical_distance.h",
"src/ink/types/small_array.h",
"src/ink/types/uri.cc",
"src/ink/types/uri.h",
]
public_configs = [ ":public_config" ]

@ -1,7 +1,7 @@
Name: Ink
URL: https://github.com/google/ink.git
Version: N/A
Revision: bf387a71d7def4b48bf24c8e09d412dfb9962746
Revision: c542d619a8959415beda5a76fe89ffa2f83df886
License: Apache-2.0
License File: LICENSE
Shipped: yes