Developer
Sergio Gonzalez Martin
sergiog@microsoft.com
Performance
Key patterns and highlights from this developer's activity.
Breakdown of growth, maintenance, and fixes effort over time.
Bugs introduced vs. fixed over time.
Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.
Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.
The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.
Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:
POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json
Request:
{
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-12-31T23:59:59Z",
"bucketSize": "BUCKET_SIZE_MONTH",
"groupBy": ["repository_id" | "deliverer_email"]
}
Response:
{
"productivePct": 74,
"maintenancePct": 18,
"wastedPct": 8,
"buckets": [
{
"bucketStart": "2025-01-01T00:00:00Z",
"productive": 4.2,
"maintenance": 1.8,
"wasted": 0.6
}
]
}Latest analyzed commits from this developer.
| Hash | Message | Date | Files | Effort |
|---|---|---|---|---|
| 66fc170 | This commit introduces a **new capability** to explicitly control the EXIF parsing mechanism within Skia. It adds a `ForceSkExif` method, primarily for **Chromium-specific EXIF handling**, which allows consumers to **force the use of the C++ `SkExif::Parse` implementation** even when the `rust_exif` feature is globally enabled. This modification to the **SkExif parsing logic** provides a critical override, ensuring specific downstream requirements can bypass the Rust-based parser when necessary. The change involves adding a new header `SkExifChromium.h` and updating `SkExif.cpp` to conditionally select the parser based on this new global flag. | Mar 28 | 7 | grow |
| 6a2ef28 | This commit introduces the **initial implementation** of the **`rust_exif` component**, providing a **new capability** for EXIF parsing written in Rust. This **core Rust logic** (`exif_parse.rs`) handles TIFF/EXIF data, including specific tags like Apple MakerNote for HDR headroom, and is exposed to C++ via a **Foreign Function Interface (FFI)** (`FFI.rs`, `FFI.cpp`, `FFI.h`). The new `rust_exif` module is integrated into the build system (`BUILD.gn`, `BUILD.bazel`) and includes **comparison tests** (`RustExifTest.cpp`) to ensure its behavior matches the existing `SkExif::Parse` functionality. This work establishes a Rust-based alternative for EXIF processing, ensuring consistent results with current C++ implementations. | Mar 25 | 11 | grow |
| fa3bb1f | This commit introduces a **new capability** for **Chromium's integration with Skia's codec subsystem**, allowing it to **force `skcms` for ICC profile parsing**. A new **`ICCProfileChromium` class** is added in `include/private/chromium/SkCodecsICCProfileChromium.h`, providing methods like `ForceSkcms` and `Make` to explicitly enable `skcms` processing. This ensures that even when Rust-based ICC parsing is enabled, Chromium can override and mandate `skcms` for color profile interpretation, affecting how images are color-managed. This feature also extends `skcms` forcing to non-`skCodec` consumers within Chromium, with necessary build system updates to expose these new components. | Mar 16 | 6 | grow |
| a67a797 | This commit performs **maintenance refactoring** within the **`rust/icc` module**, specifically in `FFI.rs`, to resolve nine **Clippy lint errors** that were causing build failures in Chromium's `clippy-driver` pass. The changes include simplifying nested `if-let` chains using `.and_then()` in functions like `parse_icc_profile` and `convert_to_a2b`, removing needless borrowed references, replacing range-based loops with iterator-based enumeration, and optimizing redundant closures. These **code quality improvements** ensure compliance with linting standards and facilitate successful builds without introducing any **functional changes** to the ICC profile parsing or conversion logic. | Mar 10 | 1 | maint |
| cef7d48 | This commit provides a **bug fix** and **refactoring** for **ICC profile processing** within the `rust/icc` module, resolving two distinct issues that caused CQ failures. It **corrects XYZ synthesis for GRAY profiles** by synthesizing a diagonal matrix from the profile's white point when colorant tags are absent, ensuring proper `to_xyzd50` conversion. Additionally, it **improves TRC (Tone Reproduction Curve) handling** by modifying the `IccProfile` structure to directly pass raw parametric or table bytes for `TRC` data, eliminating `±1 ULP` approximation errors previously seen with `skcms_ApproximateCurve` for profiles like Apple RGB. This change removes the now-obsolete `ApproximateCurveWrapper` and ensures **more accurate and robust color space conversions** for various ICC profiles. | Mar 9 | 6 | waste |
| 5d6eed2 | This commit provides a **bug fix** for the **Rust ICC parser's C++ bridge** (`FFI.cpp`), addressing two critical issues that impacted **ICC profile parsing**. It corrects an **endianness problem** in `ApproximateCurveWrapper` by explicitly byte-swapping `uint16_t` entries, ensuring multi-entry TRC curves are correctly approximated on little-endian systems and preventing incorrect color rendering. Additionally, it resolves an issue in `ToSkcmsA2B` and `ToSkcmsB2A` where empty grid data for CLUT-less A2B/B2A tags could lead to spurious errors, by guarding assignments with `!grid_data.empty()`. These changes ensure **accurate color management** and robust profile handling, especially when `skia_use_rust_icc` is enabled. | Mar 9 | 3 | waste |
| 819d6a7 | This commit **fixes a use-after-free bug** in the **Rust ICC profile parsing** path, specifically within the `MakeICCProfileWithRust` function. Previously, `skcms_ICCProfile` objects returned by this function contained dangling pointers to data from a stack-allocated `rust_icc::IccProfile`, leading to potential crashes. The **bug fix** introduces a **new `fRetainedData` member** (a `std::shared_ptr<void>`) to the `ColorProfile` class, which now **heap-allocates** the `rust_icc::IccProfile` and retains ownership of its underlying data buffers. This ensures the necessary data remains valid for the lifetime of the `ColorProfile`, significantly improving the **stability of color profile handling** when using the Rust backend. | Feb 21 | 3 | waste |
| 9deba67 | This commit delivers a **bug fix** for the **`rust/icc`** module, resolving an **endianness issue** that caused **corrupted color transforms** when processing ICC profiles. Previously, the `u16_vec_to_bytes` function in `rust/icc/FFI.rs` incorrectly serialized `u16` data to little-endian bytes, while `skcms` expects this data (e.g., for A2B/B2A table-based curves or CLUT grid data) in big-endian format. The fix involves changing `to_le_bytes()` to `to_be_bytes()` to ensure proper data serialization for **ICC profile parsing**. Additionally, a new ICC profile (`apng19.png`) was added as a test resource, and the `RustIcc_equivalence_with_skcms_resource_files` test was enhanced to perform thorough byte-by-byte comparisons of curve entries and grid data, improving the robustness of **color management** validation. | Feb 19 | 3 | maint |
| ce58544 | This commit introduces **incremental and streaming decode support** for **BMP images** within the `SkBmpRustCodec`. It enables progressive loading of BMPs, particularly for network streaming, by leveraging a new resumable decoder API in the Rust `image` crate and updating the Rust toolchain. The **Rust FFI** now buffers decoded pixels and exposes them efficiently, while the **C++ `SkCodec` implementation** handles incremental decoding, subsetting, and **ICC color profile extraction** using `skcms_Transform`. This **new capability** significantly enhances the flexibility and performance of BMP decoding in scenarios where data arrives piecemeal, reducing cross-language overhead. Comprehensive tests for incremental decoding, streaming, and ICC profile handling have also been added. | Feb 13 | 8 | grow |
| 3d6cc68 | This commit implements a **bug fix** within the `SkStreamAdapter` component, specifically addressing an issue with its `seek_relative` method. Previously, the **BMP decoder**'s use of `std::io::Seek::stream_position()` would trigger a zero-offset seek, which Chromium's `SegmentStream` incorrectly rejected. The fix modifies `SkStreamAdapter::seek_relative` in `rust/common/SkStreamAdapter.cpp` to prevent calling the underlying stream's `move` operation when the requested offset is zero. This ensures robust stream handling and prevents failures when decoding **BMP images** in environments that utilize `SegmentStream`, such as **Chromium**. | Feb 13 | 1 | waste |
| e4bd0a3 | This commit performs a **refactoring** and **dependency update** within the **Rust ICC module**. It **updates the `moxcms` crate to version 0.8.0** and **eliminates previously replicated private code** for handling parametric curve parameters. Instead, the `rust/icc/FFI.rs` module now directly utilizes the public `moxcms::ParametricCurve` API for curve conversion logic, specifically impacting functions like `parametric_curve_to_transfer_function`. This change improves **code maintainability** by leveraging the upstream library's official implementation, thereby **reducing redundancy** in the color management subsystem. | Jan 22 | 3 | maint |
| a0f1894 | This commit delivers **bug fixes** and **improvements** to the **`rust_icc` profile parsing library**, addressing several known gaps in its initial implementation. It enhances the `rust/icc/FFI.rs` module to correctly support a broader range of **ICC parametric curve types** and properly interpret **empty curve tables** as linear/identity functions. Furthermore, it adds crucial **A2B/B2A transform validation** and correct application of encoding factors, ensuring more accurate and robust parsing of ICC profiles. These corrections enable the `RustIcc_equivalence_with_skcms_resource_files` test to fully validate `rust_icc`'s parsed structures against `skcms`. | Dec 23 | 2 | waste |
| 0a0079a | This commit introduces an **initial implementation** of a **Rust FFI layer** for **ICC profile parsing**, leveraging the `moxcms` crate. It provides the **color management** and **codec subsystems** with the ability to parse ICC profiles using Rust, converting them into `skcms`-compatible data structures via `rust/icc/FFI.rs` and its C++ FFI wrappers. This **new capability** required extensive updates to the **build system (GN and Bazel)** to integrate the Rust module and its dependencies, including a new `skia_use_rust_icc` flag. This foundational work prepares the project for **future integration of Rust-based ICC parsing into rustified image codecs**, enhancing color profile handling. | Dec 13 | 20 | grow |
| 7d71b1f | This commit **relays the initial implementation of a Rust-based BMP decoder** for Skia, introducing a **new experimental feature** aimed at providing a memory-safe alternative to the existing C++ decoder. It integrates the `image-rs` crate via a **Rust FFI layer** and a **C++ integration layer** (`SkBmpRustCodec`), while intentionally omitting support for embedded JPEG/PNG to simplify its architecture. The **build system** (GN and Bazel) is updated to support this new component, which can be enabled via the `skia_use_rust_bmp_decode` flag, and includes dedicated **unit tests and fuzzing**. This work significantly expands Skia's **image decoding capabilities** with a modern, memory-safe approach. | Dec 10 | 31 | grow |
| 16b08e8 | This commit introduces an **experimental new capability** to Skia: a **Rust-based BMP decoder**, providing a memory-safe alternative to the existing C++ implementation. This **new feature** leverages the `image-rs` crate and integrates into **Skia's image decoding subsystem** via a C++ FFI layer (`SkBmpRustCodec`), affecting how BMP images are processed. It is conditionally compiled using the `skia_use_rust_bmp_decode` flag and intentionally drops support for embedded JPEG and PNG to simplify its architecture. The change includes **build system updates** for Bazel and GN, along with comprehensive **unit tests** (`SkBmpRustDecoderTest.cpp`) and a **fuzzer** (`FuzzBMPRustDecoder.cpp`) to ensure its robustness. | Dec 9 | 31 | grow |
| 77c7ba9 | This commit performs a **maintenance refactoring** of the **Rust build process** within the **Bazel build system**. It **consolidates multiple Rust Bazel build actions** defined in `BUILD.gn` into a single unified `rust_all_ffi_bazel_build` action. This change prevents **symbol duplication** from `std/core` Rust libraries that previously occurred when each action generated its own static library, ensuring a single static library is produced for all Rust FFI targets. The `gn/bazel_build.py` script was also updated to support building multiple targets in this consolidated manner, leading to a more robust and efficient build for Rust components by ensuring **correct linking of Rust FFI targets**. | Dec 4 | 2 | maint |
| 767839a | This commit performs **build system maintenance** by adjusting dependencies within the **Rust CXX FFI integration** to ensure correct build order. It explicitly adds a dependency from the `rust_common` module to the `rust_cxx_core_bazel_build` action, guaranteeing that the critical `cxx.h` header is generated before `rust_common` compilation. Concurrently, an unnecessary dependency from the `png cxx_bridge` to `rust/common:ffi_utils` is removed, streamlining the build graph. This change also involves a **refactoring** of the build target name from `rust_png_cxx_core_bazel_build` to `rust_cxx_core_bazel_build` in `BUILD.gn`, impacting `png_decode_rust` and `png_encode_rust` to use the new, more general target. | Nov 18 | 2 | maint |
| 5c34096 | This commit **refactors** the **Rust FFI stream adaptation** by extracting the `Read` and `Seek` trait implementations, previously specific to `rust/png`, into a new **`rust/common`** module. This centralizes the `SkStreamAdapter` C++ implementation and its Rust FFI bindings (`io_traits_ffi.rs`) to promote **code reuse** across various image codecs. The **`rust/png`** module is updated to utilize these new common utilities, removing its redundant local `ReadAndSeekTraits` implementation. This **architectural improvement** standardizes how **`SkStream`** is exposed to Rust as `Read` and `Seek` traits, enabling other Rust-based codec implementations (e.g., BMP, JPEG) to leverage this shared infrastructure and reducing future code duplication. | Nov 15 | 14 | grow |
| e71c9d4 | This commit **creates the foundational build system integration for Rust common FFI utilities** within Skia, specifically for Chromium's GN. It introduces a **new `gn/rust.gni` file** to define variables for Rust common FFI source files and updates **Bazel targets in `rust/common/BUILD.bazel`** to define new `rust_cxx_bridge` and `rust_library` targets. This work also **refactors existing `span_utils` references to `ffi_utils`** across various GN and Bazel files, establishing the necessary infrastructure for sharing Rust code. This **preparatory step** enables the integration of Rust common FFI utilities into Chromium's build system and is a prerequisite for refactoring the `rust/png` module to use these common traits. | Nov 13 | 11 | grow |
| 5658e91 | This commit performs a significant **refactoring** of the project's Rust integration utilities by **moving and renaming** the `UtilsForFFI.h` header to `rust/common/SpanUtils.h`. This change centralizes common **FFI utility functions** into a new, shared `rust/common` module, making them accessible to multiple Rust-based codecs. The **Bazel** and **GN build configurations** are extensively updated across various files, including `src/codec/BUILD.bazel` and `gn/codec.gni`, to reflect the new location and ensure proper linking for existing Rust PNG components. This **maintenance** work is crucial for **enabling future Rust implementations**, such as a new BMP decoder, by providing a common set of tools. | Oct 30 | 10 | maint |
This commit introduces a **new capability** to explicitly control the EXIF parsing mechanism within Skia. It adds a `ForceSkExif` method, primarily for **Chromium-specific EXIF handling**, which allows consumers to **force the use of the C++ `SkExif::Parse` implementation** even when the `rust_exif` feature is globally enabled. This modification to the **SkExif parsing logic** provides a critical override, ensuring specific downstream requirements can bypass the Rust-based parser when necessary. The change involves adding a new header `SkExifChromium.h` and updating `SkExif.cpp` to conditionally select the parser based on this new global flag.
This commit introduces the **initial implementation** of the **`rust_exif` component**, providing a **new capability** for EXIF parsing written in Rust. This **core Rust logic** (`exif_parse.rs`) handles TIFF/EXIF data, including specific tags like Apple MakerNote for HDR headroom, and is exposed to C++ via a **Foreign Function Interface (FFI)** (`FFI.rs`, `FFI.cpp`, `FFI.h`). The new `rust_exif` module is integrated into the build system (`BUILD.gn`, `BUILD.bazel`) and includes **comparison tests** (`RustExifTest.cpp`) to ensure its behavior matches the existing `SkExif::Parse` functionality. This work establishes a Rust-based alternative for EXIF processing, ensuring consistent results with current C++ implementations.
This commit introduces a **new capability** for **Chromium's integration with Skia's codec subsystem**, allowing it to **force `skcms` for ICC profile parsing**. A new **`ICCProfileChromium` class** is added in `include/private/chromium/SkCodecsICCProfileChromium.h`, providing methods like `ForceSkcms` and `Make` to explicitly enable `skcms` processing. This ensures that even when Rust-based ICC parsing is enabled, Chromium can override and mandate `skcms` for color profile interpretation, affecting how images are color-managed. This feature also extends `skcms` forcing to non-`skCodec` consumers within Chromium, with necessary build system updates to expose these new components.
This commit performs **maintenance refactoring** within the **`rust/icc` module**, specifically in `FFI.rs`, to resolve nine **Clippy lint errors** that were causing build failures in Chromium's `clippy-driver` pass. The changes include simplifying nested `if-let` chains using `.and_then()` in functions like `parse_icc_profile` and `convert_to_a2b`, removing needless borrowed references, replacing range-based loops with iterator-based enumeration, and optimizing redundant closures. These **code quality improvements** ensure compliance with linting standards and facilitate successful builds without introducing any **functional changes** to the ICC profile parsing or conversion logic.
This commit provides a **bug fix** and **refactoring** for **ICC profile processing** within the `rust/icc` module, resolving two distinct issues that caused CQ failures. It **corrects XYZ synthesis for GRAY profiles** by synthesizing a diagonal matrix from the profile's white point when colorant tags are absent, ensuring proper `to_xyzd50` conversion. Additionally, it **improves TRC (Tone Reproduction Curve) handling** by modifying the `IccProfile` structure to directly pass raw parametric or table bytes for `TRC` data, eliminating `±1 ULP` approximation errors previously seen with `skcms_ApproximateCurve` for profiles like Apple RGB. This change removes the now-obsolete `ApproximateCurveWrapper` and ensures **more accurate and robust color space conversions** for various ICC profiles.
This commit provides a **bug fix** for the **Rust ICC parser's C++ bridge** (`FFI.cpp`), addressing two critical issues that impacted **ICC profile parsing**. It corrects an **endianness problem** in `ApproximateCurveWrapper` by explicitly byte-swapping `uint16_t` entries, ensuring multi-entry TRC curves are correctly approximated on little-endian systems and preventing incorrect color rendering. Additionally, it resolves an issue in `ToSkcmsA2B` and `ToSkcmsB2A` where empty grid data for CLUT-less A2B/B2A tags could lead to spurious errors, by guarding assignments with `!grid_data.empty()`. These changes ensure **accurate color management** and robust profile handling, especially when `skia_use_rust_icc` is enabled.
This commit **fixes a use-after-free bug** in the **Rust ICC profile parsing** path, specifically within the `MakeICCProfileWithRust` function. Previously, `skcms_ICCProfile` objects returned by this function contained dangling pointers to data from a stack-allocated `rust_icc::IccProfile`, leading to potential crashes. The **bug fix** introduces a **new `fRetainedData` member** (a `std::shared_ptr<void>`) to the `ColorProfile` class, which now **heap-allocates** the `rust_icc::IccProfile` and retains ownership of its underlying data buffers. This ensures the necessary data remains valid for the lifetime of the `ColorProfile`, significantly improving the **stability of color profile handling** when using the Rust backend.
This commit delivers a **bug fix** for the **`rust/icc`** module, resolving an **endianness issue** that caused **corrupted color transforms** when processing ICC profiles. Previously, the `u16_vec_to_bytes` function in `rust/icc/FFI.rs` incorrectly serialized `u16` data to little-endian bytes, while `skcms` expects this data (e.g., for A2B/B2A table-based curves or CLUT grid data) in big-endian format. The fix involves changing `to_le_bytes()` to `to_be_bytes()` to ensure proper data serialization for **ICC profile parsing**. Additionally, a new ICC profile (`apng19.png`) was added as a test resource, and the `RustIcc_equivalence_with_skcms_resource_files` test was enhanced to perform thorough byte-by-byte comparisons of curve entries and grid data, improving the robustness of **color management** validation.
This commit introduces **incremental and streaming decode support** for **BMP images** within the `SkBmpRustCodec`. It enables progressive loading of BMPs, particularly for network streaming, by leveraging a new resumable decoder API in the Rust `image` crate and updating the Rust toolchain. The **Rust FFI** now buffers decoded pixels and exposes them efficiently, while the **C++ `SkCodec` implementation** handles incremental decoding, subsetting, and **ICC color profile extraction** using `skcms_Transform`. This **new capability** significantly enhances the flexibility and performance of BMP decoding in scenarios where data arrives piecemeal, reducing cross-language overhead. Comprehensive tests for incremental decoding, streaming, and ICC profile handling have also been added.
This commit implements a **bug fix** within the `SkStreamAdapter` component, specifically addressing an issue with its `seek_relative` method. Previously, the **BMP decoder**'s use of `std::io::Seek::stream_position()` would trigger a zero-offset seek, which Chromium's `SegmentStream` incorrectly rejected. The fix modifies `SkStreamAdapter::seek_relative` in `rust/common/SkStreamAdapter.cpp` to prevent calling the underlying stream's `move` operation when the requested offset is zero. This ensures robust stream handling and prevents failures when decoding **BMP images** in environments that utilize `SegmentStream`, such as **Chromium**.
This commit performs a **refactoring** and **dependency update** within the **Rust ICC module**. It **updates the `moxcms` crate to version 0.8.0** and **eliminates previously replicated private code** for handling parametric curve parameters. Instead, the `rust/icc/FFI.rs` module now directly utilizes the public `moxcms::ParametricCurve` API for curve conversion logic, specifically impacting functions like `parametric_curve_to_transfer_function`. This change improves **code maintainability** by leveraging the upstream library's official implementation, thereby **reducing redundancy** in the color management subsystem.
This commit delivers **bug fixes** and **improvements** to the **`rust_icc` profile parsing library**, addressing several known gaps in its initial implementation. It enhances the `rust/icc/FFI.rs` module to correctly support a broader range of **ICC parametric curve types** and properly interpret **empty curve tables** as linear/identity functions. Furthermore, it adds crucial **A2B/B2A transform validation** and correct application of encoding factors, ensuring more accurate and robust parsing of ICC profiles. These corrections enable the `RustIcc_equivalence_with_skcms_resource_files` test to fully validate `rust_icc`'s parsed structures against `skcms`.
This commit introduces an **initial implementation** of a **Rust FFI layer** for **ICC profile parsing**, leveraging the `moxcms` crate. It provides the **color management** and **codec subsystems** with the ability to parse ICC profiles using Rust, converting them into `skcms`-compatible data structures via `rust/icc/FFI.rs` and its C++ FFI wrappers. This **new capability** required extensive updates to the **build system (GN and Bazel)** to integrate the Rust module and its dependencies, including a new `skia_use_rust_icc` flag. This foundational work prepares the project for **future integration of Rust-based ICC parsing into rustified image codecs**, enhancing color profile handling.
This commit **relays the initial implementation of a Rust-based BMP decoder** for Skia, introducing a **new experimental feature** aimed at providing a memory-safe alternative to the existing C++ decoder. It integrates the `image-rs` crate via a **Rust FFI layer** and a **C++ integration layer** (`SkBmpRustCodec`), while intentionally omitting support for embedded JPEG/PNG to simplify its architecture. The **build system** (GN and Bazel) is updated to support this new component, which can be enabled via the `skia_use_rust_bmp_decode` flag, and includes dedicated **unit tests and fuzzing**. This work significantly expands Skia's **image decoding capabilities** with a modern, memory-safe approach.
This commit introduces an **experimental new capability** to Skia: a **Rust-based BMP decoder**, providing a memory-safe alternative to the existing C++ implementation. This **new feature** leverages the `image-rs` crate and integrates into **Skia's image decoding subsystem** via a C++ FFI layer (`SkBmpRustCodec`), affecting how BMP images are processed. It is conditionally compiled using the `skia_use_rust_bmp_decode` flag and intentionally drops support for embedded JPEG and PNG to simplify its architecture. The change includes **build system updates** for Bazel and GN, along with comprehensive **unit tests** (`SkBmpRustDecoderTest.cpp`) and a **fuzzer** (`FuzzBMPRustDecoder.cpp`) to ensure its robustness.
This commit performs a **maintenance refactoring** of the **Rust build process** within the **Bazel build system**. It **consolidates multiple Rust Bazel build actions** defined in `BUILD.gn` into a single unified `rust_all_ffi_bazel_build` action. This change prevents **symbol duplication** from `std/core` Rust libraries that previously occurred when each action generated its own static library, ensuring a single static library is produced for all Rust FFI targets. The `gn/bazel_build.py` script was also updated to support building multiple targets in this consolidated manner, leading to a more robust and efficient build for Rust components by ensuring **correct linking of Rust FFI targets**.
This commit performs **build system maintenance** by adjusting dependencies within the **Rust CXX FFI integration** to ensure correct build order. It explicitly adds a dependency from the `rust_common` module to the `rust_cxx_core_bazel_build` action, guaranteeing that the critical `cxx.h` header is generated before `rust_common` compilation. Concurrently, an unnecessary dependency from the `png cxx_bridge` to `rust/common:ffi_utils` is removed, streamlining the build graph. This change also involves a **refactoring** of the build target name from `rust_png_cxx_core_bazel_build` to `rust_cxx_core_bazel_build` in `BUILD.gn`, impacting `png_decode_rust` and `png_encode_rust` to use the new, more general target.
This commit **refactors** the **Rust FFI stream adaptation** by extracting the `Read` and `Seek` trait implementations, previously specific to `rust/png`, into a new **`rust/common`** module. This centralizes the `SkStreamAdapter` C++ implementation and its Rust FFI bindings (`io_traits_ffi.rs`) to promote **code reuse** across various image codecs. The **`rust/png`** module is updated to utilize these new common utilities, removing its redundant local `ReadAndSeekTraits` implementation. This **architectural improvement** standardizes how **`SkStream`** is exposed to Rust as `Read` and `Seek` traits, enabling other Rust-based codec implementations (e.g., BMP, JPEG) to leverage this shared infrastructure and reducing future code duplication.
This commit **creates the foundational build system integration for Rust common FFI utilities** within Skia, specifically for Chromium's GN. It introduces a **new `gn/rust.gni` file** to define variables for Rust common FFI source files and updates **Bazel targets in `rust/common/BUILD.bazel`** to define new `rust_cxx_bridge` and `rust_library` targets. This work also **refactors existing `span_utils` references to `ffi_utils`** across various GN and Bazel files, establishing the necessary infrastructure for sharing Rust code. This **preparatory step** enables the integration of Rust common FFI utilities into Chromium's build system and is a prerequisite for refactoring the `rust/png` module to use these common traits.
This commit performs a significant **refactoring** of the project's Rust integration utilities by **moving and renaming** the `UtilsForFFI.h` header to `rust/common/SpanUtils.h`. This change centralizes common **FFI utility functions** into a new, shared `rust/common` module, making them accessible to multiple Rust-based codecs. The **Bazel** and **GN build configurations** are extensively updated across various files, including `src/codec/BUILD.bazel` and `gn/codec.gni`, to reflect the new location and ensure proper linking for existing Rust PNG components. This **maintenance** work is crucial for **enabling future Rust implementations**, such as a new BMP decoder, by providing a common set of tools.
Commit activity distribution by hour and day of week. Shows when this developer is most active.
Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.