Skip to content

Fix documentation errors in Android.Graphics (R138) - #1645

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-r138-android-graphics
Nov 20, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-r138-android-graphics

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Scope

Review item R138: AI-authored documentation changes since 86f7744a1 in 38 docs/xml/Android.Graphics files (PointF through YuvImage; list from the campaign item file). All listed files still exist after #1594. No placeholders were left in scope.

Sources: Android SDK source-37.2_r01.zip (SHA256 9d637c3af6654a2f1b696b3d19c54bb77e38df2b0106116934703f314b3d4e84).

Fixes (4)

  1. RecordingCanvas.DrawDoubleRoundRect(RectF, float, float, RectF, float, float, Paint), innerRy: the imported text said "on the outer rectangle". That is an upstream typo. BaseRecordingCanvas.java drawDoubleRoundRect passes innerRx, innerRy together with inner.left..inner.bottom to the inner parameters of nDrawDoubleRoundRect. The sibling innerRx text already says "inner". Changed to "inner rectangle".
  2. RecordingCanvas.DrawBitmap(int[], int, int, int, int, int, int, bool, Paint), hasAlpha: removed AI text that described native storage "in the Android 16 implementation". These are API 37 docs. BaseRecordingCanvas.java:174-179 shows that this overload calls the float x, float y overload, so I used the official hasAlpha text of that overload (the same text as the float overload in this file).
  3. Region.Set(Region), returns: removed the wrong "Android 16" label. Region.java:92-95 (37.2) returns true with no condition.
  4. Rasterizer() constructor, summary: removed the wrong "on Android 16" label. Rasterizer.java (37.2) has no native peer, only finalize().

Uncertain findings (not changed)

  • RecordingCanvas.DrawMesh, blendMode: the text "the operation is ignored if the mesh has no color output" is not in the Android Javadoc (BaseCanvas.java drawMesh). The null -> BlendMode.Modulate part is correct (BaseRecordingCanvas.java:618-620). The Java sources do not include the native mesh code, so I cannot prove or disprove the "ignored" claim.

Checks

  • Each changed XML file parses.
  • git diff --check passes.
  • No new To be added placeholders.
  • All cref values in the 38 files resolve, except external System.* types and one pre-AI T:Android.Graphics._Color (out of scope).
  • Byte changes are limited to the 4 edited lines. BOM and newlines are unchanged.
  • Rubber-duck review with gemini-4-argon (confirmed in the usage log). It agreed with fixes 1, 3 and 4 and recommended fix 2.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 20, 2026 06:11
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 20, 2026 06:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the documentation-only changes.

No open issues 🎉

What changed in this PR

Corrects four documentation statements across three Android.Graphics files to match Android 37.2 sources. No API or runtime behavior changes.

Changes:

  • Clarifies RecordingCanvas alpha-channel behavior and corrects the inner corner-radius description.
  • Removes incorrect Android 16 references from Region.Set and the Rasterizer constructor.
File Description
docs/​xml/​Android.Graphics/​Region.xml Removes the version-specific label from Set(Region) return documentation.
docs/​xml/​Android.Graphics/​RecordingCanvas.xml Corrects hasAlpha and innerRy parameter descriptions.
docs/​xml/​Android.Graphics/​Rasterizer.xml Removes the version-specific label from the constructor summary.

Review effort: Balanced

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed 3b016cb6 against main at f4688ad3. This is a static, read-only review.

  • RecordingCanvas.DrawDoubleRoundRect, innerRy: "inner rectangle" is correct. BaseRecordingCanvas.drawDoubleRoundRect (android-17.0.0_r1, L402–407) passes inner.left..inner.bottom, innerRx, innerRy to nDrawDoubleRoundRect. The "outer" wording is an upstream Javadoc typo (Canvas.java L2098).
  • RecordingCanvas.DrawBitmap(int[], int, int, int, int, int, int, bool, Paint), hasAlpha: the overload forwards to the float overload (BaseRecordingCanvas.java L174–179). The new text is the official Javadoc (Canvas.java L1680–1681) and matches the float overload in this file.
  • Region.Set(Region) returns true unconditionally after a void nativeSetRegion (Region.java L95–98; the code is the same at android-5.0.0_r1). The Rasterizer constructor has no native peer (only an empty finalize()). The wording without a version label is accurate for both.
  • The three files parse. The diff is limited to the four edited lines, and line endings and encoding are unchanged. In the 37 files from PointF.xml to YuvImage.xml at this head I found no remaining "Android 1x" version labels, no orphan params and no placeholders.
  • On the DrawMesh uncertain finding: Skia's SkCanvas::drawMesh docs (include/core/SkCanvas.h L2107, L2116–2118) say the blender is ignored when the mesh does not output color, which supports the current text.
  • Out of scope, for a follow-up: Canvas.xml has the same two problems, at L1778 (the "Android 16" hasAlpha text) and L2338 (innerRy "outer rectangle").

@jonathanpeppers
jonathanpeppers merged commit 76be94a into main Nov 20, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-r138-android-graphics branch November 20, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants