Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implemented stride in AImageView#702

Open
Nelonn wants to merge 4 commits intoaui-framework:developfrom
Nelonn:feat/imageview-stride2
Open

Implemented stride in AImageView#702
Nelonn wants to merge 4 commits intoaui-framework:developfrom
Nelonn:feat/imageview-stride2

Conversation

Copy link

Nelonn commented Feb 20, 2026

No description provided.

Copy link

gemini-code-assist bot commented Feb 20, 2026

Summary of Changes

Hello @Nelonn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the AImageView class by introducing explicit support for image data strides. This allows AImageView to correctly interpret and access pixels from image buffers that may have padding between rows, which is common in various image formats or hardware-aligned memory. The changes include new constructors, updated pixel access logic, and a dedicated test to ensure robustness.

Highlights

  • Explicit Stride Support: Introduced a new constructor for AImageView that allows specifying an explicit stride (bytes per row), enabling the view to handle padded or externally aligned image memory.
  • Automatic Stride Calculation: Modified the existing AImageView constructor to automatically calculate the stride for tightly packed image data, ensuring backward compatibility and ease of use for common scenarios.
  • Pixel Access Logic Update: Updated the get method within AImageView to utilize the newly introduced mStride member, ensuring correct pixel retrieval regardless of whether the image data is tightly packed or has padding.
  • Stride Member Variable: Added a mStride member variable to the AImageView class to store the row stride information.
  • New Test Case: Added a new test file ImageViewTest.cpp with a test case to verify the correct functionality of the AImageView with explicit stride values.

New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • aui.image/src/AUI/Image/AImageView.h
    • Added a new constructor AImageView(AByteBufferView data, size_t stride, glm::uvec2 size, APixelFormat format) to support explicit row stride.
    • Modified the existing constructor AImageView(AByteBufferView data, glm::uvec2 size, APixelFormat format) to automatically calculate stride for tightly packed data.
    • Updated the get method to use the mStride member for accurate pixel access.
    • Introduced size_t mStride as a protected member variable.
  • aui.image/tests/ImageViewTest.cpp
    • Added a new test file ImageViewTest.cpp.
    • Included a TEST(ImageView, Stride) case to validate AImageView functionality with different stride values.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini or @gemini-code-assist . Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with and on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. -

Copy link

gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The PR introduces row stride support to AImageView, which is a valuable feature for handling padded image data. However, the current implementation is incomplete and introduces regressions in derived classes. Specifically, AImage and AFormattedImageView (and its iteration methods) still assume tightly packed data, which will lead to incorrect behavior or crashes when a custom stride is used. Additionally, the new mStride member is not initialized in all constructors.

Nelonn added 3 commits February 20, 2026 22:44
Nelonn requested review from Alex2772 February 27, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Alex2772 Awaiting requested review from Alex2772

1 more reviewer

gemini-code-assist[bot] gemini-code-assist[bot] left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant